Тёмный

LeetCode Problem: 217. Contains Duplicate | Java Solution 

Code for Interview
Подписаться 51 тыс.
Просмотров 7 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@codeforinterview
@codeforinterview Год назад
There is a slight mistake in Brute Force Approach in the video, Please refer below solution for (int i = 0 ; i < nums.length - 1; i++) { // It should go till second last element for (int j = i + 1; j < nums.length ; j++ ) { // We should check the condition with j and increment j, not i if (nums[i] == nums[j]) { return true; } } } return false; If you have a better solution, do comment. and check out the whole playlist of Leetcode questions ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-cORK0YESg9A.html
@vanshmodi14
@vanshmodi14 Год назад
After knowing the mistake in the video than correcting it in comment box is very rare not everyone do that, we need teachers like you😃😃.
@codeforinterview
@codeforinterview Год назад
🙌🙌
@anuragsuryawanshi4177
@anuragsuryawanshi4177 2 года назад
Sir, you are amazing I recently started learning DSA in java and for this question I couldn't think beyond brute-force solution, but you explained every solution in a very simplistic manner Please keep making such amazing lectures
@codeforinterview
@codeforinterview Год назад
thankyou so much 🙌
@anandkumarnitrourkela7404
@anandkumarnitrourkela7404 10 месяцев назад
Great explaination.Keep uploading more such videos.
@codeforinterview
@codeforinterview 10 месяцев назад
Thank you, I will
@mansigoyal9664
@mansigoyal9664 2 года назад
Great explaination sir, you are always the besttt. Big fan of you sirrrrrrr👏👏💯💯
@codeforinterview
@codeforinterview 2 года назад
Thank you so much 😀
@your_anonymous454
@your_anonymous454 Месяц назад
sir can we use this sort method directly in interview as well?
@sanchitsingh6942
@sanchitsingh6942 2 года назад
Bhaiya agr hume element mil jaye toh return true krke break lga do hume aage again check krne ki zaroorat nhi hai. Thankyou for this .Please Never stop this leetcode series😀
@codeforinterview
@codeforinterview Год назад
thanks for your comment, one thing to note is return will work like a break statement because if the element is found, it will return the function and will not check any further.
@akshaykumar192
@akshaykumar192 Год назад
arrays.sort(nums) karne par undeclared identifier kyu bata raha hai ?
@codeforinterview
@codeforinterview Год назад
I am not sure, I am not able to replicate the same
@AnasAnsari-xo8bc
@AnasAnsari-xo8bc 2 года назад
Bhadia sir Video banate rahiya
@codeforinterview
@codeforinterview 2 года назад
Thank you so much 😀
@videshpundir34
@videshpundir34 Год назад
Thank you so much..
@codeforinterview
@codeforinterview Год назад
You're most welcome
@suryas8407
@suryas8407 7 месяцев назад
Thank You
@codeforinterview
@codeforinterview 6 месяцев назад
welcome. please find the whole playlist here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-cORK0YESg9A.html
@anoopshetty3580
@anoopshetty3580 7 месяцев назад
let mySet = new Set(nums) let bool = false if(nums.length!=mySet.size) { bool=true } return bool }; how is my code
Далее
Contains Duplicate - Leetcode 217 - Python
6:31
Просмотров 642 тыс.
Viral Video of a Man's Crazy Job Interview
16:02
Просмотров 1,5 млн
The TRIPLE FOLDING phone has a Problem.
12:54
Просмотров 1,9 млн
Microsoft Makes Windows Worse With AI
9:34
Просмотров 168 тыс.