sdesheet's People
Forkers
soumik-7031 nistha-tech shaiksarfraj-tech bharat1111 satyammishra2001 adii07 vidushibhardwaj saini-mn23 ameya101 prakriti28 devesh-rathod mgangrade24 jssam amritapandey22 harishsg99 winstrom32 venkatachandukonduru jvishad teja0404 hidayat7z gaikwadparag chirag291 ybavgito prathamv007 avinashvrm vishant016 sandeep-das-og harshi606 rohitrai300 abhishekdhar30 arunpandeyy1 rishabh-kesarwani developerdiver swagatpanda213 ajaymaida neversettlejay likhithameti champmaniac subh1511 jarvis-byte gourav02 sparshvrao ayeshasumaiyakhan sbshubh01 laaaaksh nikhild23 sreelakshmi89 f20190201 pbpcodes swap1609 hoopinwhoopin aditiaher akashdwivedi98 saisyama31 saahiil-pny aditiagarw4722 hppy97 arlyngithub vasu3445 priyaraj17 ayushdevrani ritesh1731 inshorebrand rudra-prasad-das godspeed007 pkalyan264 sarveshgithub ritendra97 maheshdbabar9340 mrsmithx2970 aditya1922 jatin196 aditya1819 rajukumar2152 yakshchopra ava68 ayushparikh-code cchintu sharad86 ayan-10 ajaysharma132 coddington codebuzzer01 wpn10 rishi-srec alay28 ayush237 hyzenberg22 aniudhnegi algo-manish kapushion saurav1423 im-prakher bazinga007777 nitesh-singh-5 ushmita4 malik0011 theritikdubey ayush1207 hinal-srivastavasdesheet's Issues
Make separate folders for Java and Cpp code
Make separate folders for Java and Cpp code.
In this file C++ code is given instead of Java Code
Optimal Approach in JAVA
class Solution {
public List<List> threeSum(int[] nums) {
Set<List> res = new HashSet<>();
if(nums.length==0) return new ArrayList<>(res);
Arrays.sort(nums);
for(int i=0; i<nums.length-2; i++){
int j = i+1;
int k = nums.length-1;
while(j<k){
int sum = nums[j]+nums[k];
if(sum == -nums[i])
res.add(Arrays.asList(nums[i], nums[j++], nums[k--]));
else if( sum > -nums[i]) k--;
else if( sum <-nums[i]) j++;
}
}
return new ArrayList<>(res);
}
}
Bug in Java Code
In the isPossible function, shouldn't the cnt variable be equal to 1, instead of 0, as it described in the video.
how u have taken int ispossible is return type is bool
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.