Naresh Gupta
Naresh Gupta
  • 405
  • 1 464 742

Video

Expo City Dome Lights Dubai
zhlédnutí 58Před 8 měsíci
#shorts #dubap #expocity #expo #dome #light #trending
Beautiful Pokhara Valley View from Sarangkot Nepal Hill Homestay Room
zhlédnutí 117Před 8 měsíci
#shorts #pokhara #nepal #mountains #lake #view #amazing #trending
Palm Island and Marina Skyscraper View from Balcony | Dubai Life
zhlédnutí 76Před 8 měsíci
#shorts #palmisland #dubaimarina #skyscraper #tower #view #dubai #dubailife #coderindubai
Tashkent Magic City Water Show | Uzbekistan | Central Asia
zhlédnutí 170Před 11 měsíci
Tashkent Magic City Water Show | Uzbekistan | Central Asia Follow me on - Instagram - naresh_gupta_foodie LinkedIn - www.linkedin.com/in/nareshiitg/
Dubai Drone Show | Enter The Future | Happy New Year 2023 | Blue Waters Island | The Beach JBR Dubai
zhlédnutí 2,9KPřed rokem
Dubai Drone Show | Enter The Future | Happy New Year 2023 | Blue Waters Island | The Beach JBR Dubai Follow me on - LinkedIn - www.linkedin.com/in/nareshiitg/ Instagram - naresh_gupta_foodie Facebook - groups/cookcodetravel Quora - www.quora.com/q/cookcodetravel
Happy New Year Fireworks | Happy New Year 2023 Dubai | JBR The Beach | Blue Water Island
zhlédnutí 385Před rokem
Happy New Year Fireworks | Happy New Year 2023 Dubai | JBR The Beach | Blue Water Island Follow me on - LinkedIn - www.linkedin.com/in/nareshiitg/ Instagram - naresh_gupta_foodie Facebook - groups/cookcodetravel Quora - www.quora.com/q/cookcodetravel
Max Consecutive Ones | LeetCode 485 | Array
zhlédnutí 1KPřed 2 lety
Problem Link - leetcode.com/problems/max-consecutive-ones/ Subscribe for more educational videos on data structure, algorithms and coding interviews - czcams.com/users/NareshGupta Code Repository - github.com/naresh1406/youtube/tree/master/src/main/cp/leetcode/problems Popular Playlists: Top Interview Questions: czcams.com/play/PLamEquLLzOthxXOEXLApkGm99TMUDrCmc.html Dynamic Programming: czcams...
RLE Iterator | LeetCode 900 | List TreeMap | Google
zhlédnutí 1,6KPřed 2 lety
(00:00) Problem Explanation (03:15) Brute Force (06:00) TreeMap Approach (10:30) Best Approach Problem Link - leetcode.com/problems/rle-iterator/Subscribe for more educational videos on data structure, algorithms and coding interviews - czcams.com/users/NareshGupta Code Repository - github.com/naresh1406/youtube/tree/master/src/main/cp/leetcode/problemsPopular Playlists:Top Interview Questions:...
Largest Plus Sign | LeetCode 764 | Matrix | Uber
zhlédnutí 2,5KPřed 2 lety
Problem Link - leetcode.com/problems/largest-plus-sign/ Subscribe for more educational videos on data structure, algorithms and coding interviews - czcams.com/users/NareshGupta Code Repository - github.com/naresh1406/youtube/tree/master/src/main/cp/leetcode/problems Popular Playlists: Top Interview Questions: czcams.com/play/PLamEquLLzOthxXOEXLApkGm99TMUDrCmc.html Dynamic Programming: czcams.co...
Shifting Letters | LeetCode 848 | String | Facebook
zhlédnutí 2,3KPřed 2 lety
Shifting Letters | LeetCode 848 | String | Facebook
Reverse Linked List | LeetCode 206 | Recursive Iterative
zhlédnutí 776Před 2 lety
Reverse Linked List | LeetCode 206 | Recursive Iterative
Slowest Key | LeetCode 1649 | String | Amazon
zhlédnutí 522Před 2 lety
Slowest Key | LeetCode 1649 | String | Amazon
Permutations | LeetCode 46 | TopInterview | Google Facebook | Backtracking
zhlédnutí 2,6KPřed 2 lety
Permutations | LeetCode 46 | TopInterview | Google Facebook | Backtracking
Reverse Integer | LeetCode 7 | Top Interview | Facebook Google Apple Amazon
zhlédnutí 8KPřed 2 lety
Reverse Integer | LeetCode 7 | Top Interview | Facebook Google Apple Amazon
Range Addition II | Leetcode 598 | Array Matrix
zhlédnutí 1,8KPřed 2 lety
Range Addition II | Leetcode 598 | Array Matrix
String to Integer atoi | Top Interview | Facebook Microsoft
zhlédnutí 1,8KPřed 2 lety
String to Integer atoi | Top Interview | Facebook Microsoft
Valid Sudoku | Leetcode 36 | Matirx | HashSet | Top Interview
zhlédnutí 7KPřed 2 lety
Valid Sudoku | Leetcode 36 | Matirx | HashSet | Top Interview
Thank You 5K Special | iPad Pro M1 Chip and Pencil Fast Unboxing
zhlédnutí 525Před 2 lety
Thank You 5K Special | iPad Pro M1 Chip and Pencil Fast Unboxing
Ferrari 🚘 Maranello Production Process Detail, Ferrari World, Abu Dhabi, UAE 🇦🇪
zhlédnutí 514Před 2 lety
Ferrari 🚘 Maranello Production Process Detail, Ferrari World, Abu Dhabi, UAE 🇦🇪
Path Sum II | Leetcode 113 | Tree DFS Backtracking | Facebook
zhlédnutí 6KPřed 2 lety
Path Sum II | Leetcode 113 | Tree DFS Backtracking | Facebook
Subsets II | Leetcode 90 | Backtracking | Facebook Amazon Apple
zhlédnutí 2KPřed 2 lety
Subsets II | Leetcode 90 | Backtracking | Facebook Amazon Apple
Making A Large Island | Leetcode 827 | Matrix Graph DFS Hard | Facebook Apple
zhlédnutí 2,1KPřed 2 lety
Making A Large Island | Leetcode 827 | Matrix Graph DFS Hard | Facebook Apple
Max Area of Island | Leetcode 695 | Matrix Graph BFS DFS | Google Facebook Amazon
zhlédnutí 1,1KPřed 2 lety
Max Area of Island | Leetcode 695 | Matrix Graph BFS DFS | Google Facebook Amazon
Trapping Rain Water | Leetcode 42 | 3 Solutions | Google Facebook Amazon | Hard
zhlédnutí 734Před 2 lety
Trapping Rain Water | Leetcode 42 | 3 Solutions | Google Facebook Amazon | Hard
Map Sum Pairs | Leetcode 677 | HashMap and Trie Solution
zhlédnutí 630Před 2 lety
Map Sum Pairs | Leetcode 677 | HashMap and Trie Solution
01 Matrix | Leetcode 542 | DFS BFS DP | Google Uber Amazon
zhlédnutí 10KPřed 2 lety
01 Matrix | Leetcode 542 | DFS BFS DP | Google Uber Amazon
3Sum Closest | Leetcode 16 | Two Pointer | Google Facebook Amazon
zhlédnutí 3,8KPřed 2 lety
3Sum Closest | Leetcode 16 | Two Pointer | Google Facebook Amazon
Binary Tree Pruning | Leetcode 814 | Binary Tree | Google Amazon
zhlédnutí 602Před 2 lety
Binary Tree Pruning | Leetcode 814 | Binary Tree | Google Amazon
Partition Array into Disjoint Intervals | Leetcode 915 | Array | Microsoft
zhlédnutí 862Před 2 lety
Partition Array into Disjoint Intervals | Leetcode 915 | Array | Microsoft

Komentáře

  • @saurabhmohrir426
    @saurabhmohrir426 Před 6 dny

    very nice solution keep it going bro

  • @eklavya22k34
    @eklavya22k34 Před 6 dny

    Thanks

  • @yashgodbole8247
    @yashgodbole8247 Před 6 dny

    but what if we change 0 to11 and 1 to 12 and 6 to 9 then the minimum value we be 9 and maximum wiil as it is 15 then difference will create of 6 . 15-9=6

  • @souravde3894
    @souravde3894 Před 8 dny

    if the String is long then we have to use this code : - import java.math.BigInteger; class Solution { public int compareVersion(String version1, String version2) { String v1[] = version1.split("\\."); String v2 []= version2.split("\\."); for (int i=0; i < Math.max(v1.length, v2.length); i++) { BigInteger num1 = i < v1.length ? new BigInteger(v1[i]) : BigInteger.ZERO; BigInteger num2 = i < v2.length ? new BigInteger(v2[i]) : BigInteger.ZERO; int comp = num1.compareTo(num2); if(comp == 0) { continue; } return comp; } return 0; } }

  • @iakshow
    @iakshow Před 19 dny

    Kadane's Algorithm it is, I no where see DP. Please don't mention DP in heading

  • @vinamrasangal8436
    @vinamrasangal8436 Před měsícem

    naresh bhai !!

  • @servantofthelord8147
    @servantofthelord8147 Před měsícem

    Thank you sir! Your video was very helpful to me!

  • @iwillleavelasto9975
    @iwillleavelasto9975 Před měsícem

    Thank you! Great quick video!

  • @sarveshjoshi6913
    @sarveshjoshi6913 Před měsícem

    u just know the solution but u cant explain it

  • @ganeshjaggineni4097
    @ganeshjaggineni4097 Před měsícem

    NICE SUPER EXCELLENT MOTIVATED

  • @ganeshjaggineni4097
    @ganeshjaggineni4097 Před měsícem

    NICE SUPER EXCELLENT MOTIVATED

  • @AshwiniYeokar
    @AshwiniYeokar Před 2 měsíci

    I am also in uae and searching for java developer position having 1.9 yrs of experience in IBM india, if you can help in placement in dubai it will b helpful. Thank you i understand this question approch from your video.

  • @ganeshjaggineni4097
    @ganeshjaggineni4097 Před 2 měsíci

    NICE SUPER EXCELLENT MOTIVATED

  • @ankurprakashsrivastava7764
    @ankurprakashsrivastava7764 Před 2 měsíci

    Very well explained 👏

  • @lavanyam3224
    @lavanyam3224 Před 2 měsíci

    I didn't even understand the problem description. After your initial beautiful explanation, I was able to code it myself! Thanks :)

  • @Codro09
    @Codro09 Před 2 měsíci

    wonderful solution sir I was watching 2-3 videos before and none of the approach was understandable and after watching yours I coded myself.

  • @user-he7wu4ms2e
    @user-he7wu4ms2e Před 2 měsíci

    Damn bro! the explanation was so neat!! keep it up

  • @theFifthMountain123
    @theFifthMountain123 Před 2 měsíci

    for the algorithm.Thanks

  • @amromar7722
    @amromar7722 Před 2 měsíci

    i"ll be using this algorithm in my assignment, i'll edit my comment if i got A+

    • @alihisham546
      @alihisham546 Před 2 měsíci

      yes me too!!! (i'm with him in the group assignment)

  • @dwakwe2796
    @dwakwe2796 Před 2 měsíci

    Thank you very much.

  • @INetreba
    @INetreba Před 2 měsíci

    Thank you! Great reasources

  • @parthh1112
    @parthh1112 Před 2 měsíci

    class Solution { public: int length (ListNode *&l){ int cnt = 0; ListNode *t = l; while(t){ t = t->next; cnt++; } return cnt; } void addZero(ListNode *&l,int cnt){ ListNode *add = new ListNode(0); ListNode *b = add; cnt--; while(cnt > 0){ cnt--; ListNode *n = new ListNode(0); add -> next = n; add = n; } add -> next = l; l = b; } void addll(ListNode *&l1,ListNode *&l2,int& cnt){ if(!l1 && !l2)return ; addll(l1->next,l2->next,cnt); int sum = l1->val+l2->val+cnt; cnt = sum / 10; l1 -> val = sum % 10; } ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { int c1 = length(l1); int c2 = length(l2); int l = abs(c1-c2); if(c1 > c2) addZero(l2,l); else if(c1 < c2) addZero(l1,l); int c = 0; addll(l1,l2,c); if(c){ ListNode *n = new ListNode(1); n -> next = l1; l1 = n; } return l1; } };

  • @sanooosai
    @sanooosai Před 3 měsíci

    great thank you

  • @FrezoreR
    @FrezoreR Před 3 měsíci

    While very simple it's pretty elegant to encode unbalanced as -1. The boolean statement could even be height(root) >= 0, which reads really well.

  • @jashanjotbedi1796
    @jashanjotbedi1796 Před 3 měsíci

    count = (k-1)*m ?? not understood this code

  • @spartant_1212
    @spartant_1212 Před 3 měsíci

    Time complexity here is O(n) is because you do not sort the result. Actually your final answer is not sorted that is not correct they expect final array should be sorted so you need to sort the array at the end and that is why time Complexity is Onlogn Please correct me If I'm wrong

  • @mayankjohari1951
    @mayankjohari1951 Před 3 měsíci

    hey How did you come on the formula for chunk ? whats the logic

  • @0xVantwoutMaarten
    @0xVantwoutMaarten Před 3 měsíci

    what a champ, happy I did not have to do this problem on my own ❤‍🔥

  • @anuragjaiswal5360
    @anuragjaiswal5360 Před 3 měsíci

    working java code: class Solution { public TreeNode construct(int[] pre, int preStart, int preEnd, int[] post, int postStart, int postEnd, HashMap<Integer, Integer> map) { if(preStart > preEnd) return null; TreeNode root = new TreeNode(pre[preStart]); if(preStart == preEnd) return root; // when there is only one node in left or right subtree int postIdx = postStart; postIdx = map.get(pre[preStart+1]); // preStart+1 bcz we can determine left and right subtree nodes by checking the pos of next node in preOrder in postorder int len = postIdx-postStart +1; root.left = construct(pre, preStart+1, preStart+len, post, postStart, postIdx, map); root.right = construct(pre, preStart+len+1, preEnd, post, postIdx+1, postEnd-1, map); return root; } public TreeNode constructFromPrePost(int[] preorder, int[] postorder) { HashMap<Integer, Integer> map = new HashMap<>(); int n = postorder.length; for(int i = 0; i < n; i++) { map.put(postorder[i], i); // indx, value } return construct(preorder, 0, n-1, postorder, 0, n-1, map); } }

  • @AhmedSoliman-dk6pc
    @AhmedSoliman-dk6pc Před 3 měsíci

    Thanks

  • @eUREKAA11
    @eUREKAA11 Před 4 měsíci

    ty

  • @akshaychavan5511
    @akshaychavan5511 Před 4 měsíci

    The idea is brilliant, but kind of slow. Here are two approaches - approach 1 - def increasingTriplet(self, nums: List[int]) -> bool: num1 = num2 = float('inf') for n in nums: if n <= num1: num1 = n elif n <= num2: num2 = n else: return True return False approach 2 - the one explained in this video [Note that, I am using only 1 pass to find both leftMin array and rightMax array] def increasingTriplet(self, nums: List[int]) -> bool: leftMin, rightMax = [], [] n = len(nums) j = n-1 minVal, maxVal = float('inf'), float('-inf') for i in range(0, n): minVal = min(minVal, nums[i]) maxVal = max(maxVal, nums[j]) leftMin.append(minVal) rightMax.append(maxVal) j-=1 for i in range(n): if nums[i]>leftMin[i] and nums[i]<rightMax[n-i-1]: return True return False

  • @bhaktisharma9681
    @bhaktisharma9681 Před 4 měsíci

    I cant thank you enough sir!!! The explanation was absolutely amazing!!!! I didnt have a doubt even for a second!! Thank you so much sir!!!

  • @jain_sahil
    @jain_sahil Před 4 měsíci

    Its fine but the explanation part can be better

  • @getwayssolution9780
    @getwayssolution9780 Před 4 měsíci

    Insted of break if we return score there than no need of maxScore

  • @tejaswipratap5340
    @tejaswipratap5340 Před 4 měsíci

    I saw 4...5 videos before watching your video sir.....great explanation....tnx👏

  • @janaarthananselvarajan264
    @janaarthananselvarajan264 Před 4 měsíci

    This is not dfs but a normal recursive function to iterate the hashmap Dfs deals with a map inside the node and go recursive with the next next nodes.

  • @stith_pragya
    @stith_pragya Před 4 měsíci

    Thank You So Much for this wonderful answer.............🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

  • @rakeshkumarmahato5772
    @rakeshkumarmahato5772 Před 4 měsíci

    class Solution { public: int bitwiseComplement(int n) { if(n==0) return 1; int i = 0; int ans = 0; while(n>0){ int bit = n&1; if(bit==0){ ans = ans+pow(2,i); } n = n>>1; i++; } return ans; } };

  • @Shivabhaktha_Karthikeyan
    @Shivabhaktha_Karthikeyan Před 4 měsíci

    Simple Explanation ❤

  • @Simon-xi8tb
    @Simon-xi8tb Před 5 měsíci

    Can someone explain (p - 1) /k +1 ? I solved it using time = p /k ; if p % k !=0 then time++ My approach of calculating time is worse than this simple formula, which i dont yet understand. I know that if you divide some natural number by number N, that the maximum remainder can be N - 1.

  • @legitx420
    @legitx420 Před 5 měsíci

    wow. Never throught of that.

  • @mohammadyahya78
    @mohammadyahya78 Před 5 měsíci

    You are the king of this problem explanation. Thank you very much.

  • @kiransequeira8902
    @kiransequeira8902 Před 5 měsíci

    beauty

  • @amitmandal5842
    @amitmandal5842 Před 5 měsíci

    Explanation is not good, it could have been better. Please try to improve.

  • @intromaker400
    @intromaker400 Před 5 měsíci

    Please come with stack ,queue, linkedlist problems more in java

  • @arshhasan2985
    @arshhasan2985 Před 6 měsíci

    u r awesome, much better than neetcode, strive solution

  • @cr8114
    @cr8114 Před 6 měsíci

    naresh you also started vlogging

  • @murtajiz545
    @murtajiz545 Před 6 měsíci

    Great video, thank you!