Pulkit Malhotra
Pulkit Malhotra
  • 228
  • 36 044
POTD- 18/10/2024 | Single Number | Problem of the Day | GeeksforGeeks
POTD: www.geeksforgeeks.org/problems/single-number1014/1
Code: discuss.geeksforgeeks.org/comment/ccef1be7-8ea9-47ab-accd-746559ff2889/practice
Timestamp:
00:00 - Explanation
00:26 - Approach
01:23 - Code
Connect with me :
LinkedIn: www.linkedin.com/in/thepulkitmalhotra/
Twitter: mobile. PulkitMalhotraa
GitHub: github.com/PulkitMalhotra161001
#coding #programming #GeeksforGeeks #ProblemofTheDay #CodingQuestions #POTD #problemsolving #practice #dsa #gfgpotd #gfg #dailychallenge #cpp #java #datastructures #algorithms #PulkitMalhotra #microsoft #amazon #google #flipkart #facebook #adobe #faang #interviewquestions
Переглядів: 12

Відео

POTD- 17/10/2024 | Split Linked List Alternatingly | Problem of the Day | GeeksforGeeks
Переглядів 902 години тому
POTD: www.geeksforgeeks.org/problems/split-singly-linked-list-alternatingly/1 Code: discuss.geeksforgeeks.org/comment/b88da08b-97c2-43fe-959c-2ab0f9af57ec/practice Timestamp: 00:00 - Explanation 01:22 - Approach 04:35 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001 #coding #programming ...
POTD- 16/10/2024 | Two Swaps | Problem of the Day | GeeksforGeeks
Переглядів 1994 години тому
POTD: www.geeksforgeeks.org/problems/two-swaps 155623/1 Code: discuss.geeksforgeeks.org/comment/be9e380f-da3c-454f-8071-a23b28c505f5/practice Timestamp: 00:00 - Explanation 01:25 - Approach 14:08 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001 #coding #programming #GeeksforGeeks #Proble...
POTD- 15/10/2024 | Subarray range with given sum | Problem of the Day | GeeksforGeeks
Переглядів 1827 годин тому
POTD: www.geeksforgeeks.org/problems/subarray-range-with-given-sum0128/1 Code: discuss.geeksforgeeks.org/comment/a9aa2675-e5a2-4565-ab88-7ee9fca342bf/practice Timestamp: 00:00 - Explanation 01:09 - Approach 10:55 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001 #coding #programming #Geek...
POTD- 14/10/2024 | Count Linked List Nodes | Problem of the Day | GeeksforGeeks
Переглядів 529 годин тому
POTD: www.geeksforgeeks.org/problems/count-nodes-of-linked-list/1 Code: discuss.geeksforgeeks.org/comment/c7f87a30-67c9-4e20-8dc3-7e1554c32116/practice Timestamp: 00:00 - Explanation 00:42 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001 #coding #programming #GeeksforGeeks #ProblemofTheD...
POTD- 13/10/2024 | Delete Alternate Nodes | Problem of the Day | GeeksforGeeks
Переглядів 7112 годин тому
POTD: www.geeksforgeeks.org/problems/delete-alternate-nodes/1 Code: discuss.geeksforgeeks.org/comment/96783a72-16db-4271-94af-0306e8990396/practice Timestamp: 00:00 - Explanation 01:02 - Approach 04:13 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001 #coding #programming #GeeksforGeeks #...
POTD- 12/10/2024 | Two Smallests in Every Subarray | Problem of the Day | GeeksforGeeks
Переглядів 28714 годин тому
POTD: www.geeksforgeeks.org/problems/maximum-sum-of-smallest-and-second-smallest-in-an-array/1 Code: discuss.geeksforgeeks.org/comment/7b207dc3-c59f-41a2-8c28-4edd489c7246/practice Timestamp: 00:00 - Explanation 02:55 - Approach 08:44 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001 #cod...
POTD- 11/10/2024 | Reorganize The Array | Cycle Sort | Problem of the Day | GeeksforGeeks
Переглядів 17416 годин тому
POTD: www.geeksforgeeks.org/problems/reorganize-the-array4810/1 Code: discuss.geeksforgeeks.org/comment/263661f7-4c10-461f-8862-f88dc55da14c/practice Timestamp: 00:00 - Explanation 01:17 - Approach 06:47 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001 #coding #programming #GeeksforGeeks...
POTD- 10/10/2024 | Max distance between same elements | Problem of the Day | GeeksforGeeks
Переглядів 18819 годин тому
POTD: www.geeksforgeeks.org/problems/max-distance-between-same-elements/1 Code: discuss.geeksforgeeks.org/comment/8a9db2b3-e18c-4bb7-9f1d-87d2551a050d/practice Timestamp: 00:00 - Explanation 01:08 - Approach 02:53 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001 #coding #programming #Gee...
POTD- 09/10/2024 | Linked List Matrix | Problem of the Day | GeeksforGeeks
Переглядів 9921 годину тому
POTD: www.geeksforgeeks.org/problems/linked-list-matrix/1 Code: discuss.geeksforgeeks.org/comment/78096b65-3640-4140-bec0-ef43fb296984/practice Timestamp: 00:00 - Explanation 01:08 - Approach 13:46 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001 #coding #programming #GeeksforGeeks #Prob...
POTD- 08/10/2024 | Largest Pair Sum | Problem of the Day | GeeksforGeeks
Переглядів 66День тому
POTD: www.geeksforgeeks.org/problems/pair-sum 120604/1 Code: discuss.geeksforgeeks.org/comment/d60d0a4f-d082-42cf-b5b3-2a8b211ed4b5/practice Timestamp: 00:00 - Explanation 00:44 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001 #coding #programming #GeeksforGeeks #ProblemofTheDay #CodingQ...
POTD- 07/10/2024 | XOR Linked List | C++ | Problem of the Day | GeeksforGeeks
Переглядів 98День тому
POTD: www.geeksforgeeks.org/problems/xor-linked-list/1 Code: discuss.geeksforgeeks.org/comment/b7c0a53b-21d2-4952-87d9-eb4d090522ef/practice Timestamp: 00:00 - Clarification 00:38 - Explanation 02:43 - Explanation of insert() 09:23 - Explanation of getList() 13:48 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github...
POTD- 07/10/2024 | XOR Linked List | Java | Problem of the Day | GeeksforGeeks
Переглядів 374День тому
POTD: www.geeksforgeeks.org/problems/xor-linked-list/1 Code: discuss.geeksforgeeks.org/comment/88a7ed50-cbc6-4656-915c-64f7dfe5bdb3/practice Timestamp: 00:00 - Explanation 01:03 - Approach 02:13 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001 #coding #programming #GeeksforGeeks #Problem...
POTD- 06/10/2024 | Find the number of islands | Problem of the Day | GeeksforGeeks
Переглядів 289День тому
POTD: www.geeksforgeeks.org/problems/find-the-number-of-islands/1 Code: discuss.geeksforgeeks.org/comment/af55cb38-e5de-4960-b6df-06d5e41d0541/practice Timestamp: 00:00 - Explanation 01:05 - Approach 06:09 - Code 08:44 - Time and Space complexity Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001...
POTD- 05/10/2024 | Not a subset sum | Problem of the Day | GeeksforGeeks
Переглядів 102День тому
POTD: www.geeksforgeeks.org/problems/smallest-number-subset1220/1 Code: discuss.geeksforgeeks.org/comment/8b3f8ddb-f855-4206-92d9-92844f75f7e0/practice Timestamp: 00:00 - Explanation 00:40 - Approach 07:54 - Code Connect with me : LinkedIn: www.linkedin.com/in/thepulkitmalhotra/ Twitter: mobile. PulkitMalhotraa GitHub: github.com/PulkitMalhotra161001 #coding #programming #GeeksforGee...
POTD- 04/10/2024 | Deletion and Reverse in Circular Linked List | Problem of the Day | GeeksforGeeks
Переглядів 45814 днів тому
POTD- 04/10/2024 | Deletion and Reverse in Circular Linked List | Problem of the Day | GeeksforGeeks
POTD- 03/10/2024 | Majority Vote | Problem of the Day | GeeksforGeeks
Переглядів 50114 днів тому
POTD- 03/10/2024 | Majority Vote | Problem of the Day | GeeksforGeeks
Rotate and delete (updated) | POTD- 02/10/2024 | Problem of the Day | GeeksforGeeks
Переглядів 3514 днів тому
Rotate and delete (updated) | POTD- 02/10/2024 | Problem of the Day | GeeksforGeeks
POTD- 02/10/2024 | Rotate and delete | Problem of the Day | GeeksforGeeks
Переглядів 1,1 тис.14 днів тому
POTD- 02/10/2024 | Rotate and delete | Problem of the Day | GeeksforGeeks
POTD- 01/10/2024 | Multiply two linked lists | Problem of the Day | GeeksforGeeks
Переглядів 12414 днів тому
POTD- 01/10/2024 | Multiply two linked lists | Problem of the Day | GeeksforGeeks
POTD- 30/09/2024 | Merge two BST 's | Problem of the Day | GeeksforGeeks
Переглядів 19114 днів тому
POTD- 30/09/2024 | Merge two BST 's | Problem of the Day | GeeksforGeeks
POTD- 29/09/2024 | Total count | Problem of the Day | GeeksforGeeks
Переглядів 2914 днів тому
POTD- 29/09/2024 | Total count | Problem of the Day | GeeksforGeeks
POTD- 28/09/2024 | Minimal Cost | Problem of the Day | GeeksforGeeks
Переглядів 5414 днів тому
POTD- 28/09/2024 | Minimal Cost | Problem of the Day | GeeksforGeeks
POTD- 27/09/2024 | K Sized Subarray Maximum | Problem of the Day | GeeksforGeeks
Переглядів 55921 день тому
POTD- 27/09/2024 | K Sized Subarray Maximum | Problem of the Day | GeeksforGeeks
POTD- 26/09/2024 | Roof Top | Problem of the Day | GeeksforGeeks
Переглядів 10221 день тому
POTD- 26/09/2024 | Roof Top | Problem of the Day | GeeksforGeeks
POTD- 25/09/2024 | Palindrome Linked List | Problem of the Day | GeeksforGeeks
Переглядів 6221 день тому
POTD- 25/09/2024 | Palindrome Linked List | Problem of the Day | GeeksforGeeks
POTD- 24/09/2024 | Smallest window in a string | Problem of the Day | GeeksforGeeks
Переглядів 17321 день тому
POTD- 24/09/2024 | Smallest window in a string | Problem of the Day | GeeksforGeeks
POTD- 23/09/2024 | Missing And Repeating | Problem of the Day | GeeksforGeeks
Переглядів 9221 день тому
POTD- 23/09/2024 | Missing And Repeating | Problem of the Day | GeeksforGeeks
POTD- 22/09/2024 | Longest Prefix Suffix | KMP Algo. | Problem of the Day | GeeksforGeeks
Переглядів 38821 день тому
POTD- 22/09/2024 | Longest Prefix Suffix | KMP Algo. | Problem of the Day | GeeksforGeeks
POTD- 21/09/2024 | Clone a LL with next and random pointer | Problem of the Day | GeeksforGeeks
Переглядів 16221 день тому
POTD- 21/09/2024 | Clone a LL with next and random pointer | Problem of the Day | GeeksforGeeks

КОМЕНТАРІ

  • @aizad786iqbal
    @aizad786iqbal 7 днів тому

    i would suggest to type the code instead, like u did yesterday, it may take more time, but it's better...

    • @PulkitMalhotra
      @PulkitMalhotra 6 днів тому

      I had less time yesterday so I did the coding while making the video.

  • @rc_0112
    @rc_0112 8 днів тому

    can you solve this question without using hashmap

    • @PulkitMalhotra
      @PulkitMalhotra 7 днів тому

      We can use array but that will be costlier in terms of space complexity.

  • @abhishekagrawal896
    @abhishekagrawal896 10 днів тому

    bro don't make such wasteless videos if you don't completely understand what really the problem is also gfg is fu** up with this problem

  • @test-nature
    @test-nature 11 днів тому

    I requested to explain quetion fully. I don't know where i missed I didn't understand the question also

  • @gowthamkumar4622
    @gowthamkumar4622 11 днів тому

    Did you even understand the P.S. ? Please don't do this for views by copying the code from comments and explaining it.

    • @PulkitMalhotra
      @PulkitMalhotra 11 днів тому

      There's a high chances that you are not a Java programmer. In the driver code XOR function is not written.

    • @PulkitMalhotra
      @PulkitMalhotra 11 днів тому

      Check out this video (C++ language) : ua-cam.com/video/JCDxVovAIRo/v-deo.html

  • @harsh-pandey
    @harsh-pandey 11 днів тому

    Keep it up brother

  • @aizad786iqbal
    @aizad786iqbal 12 днів тому

    Hangup (SIGHUP) Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 41 out of bounds for length 41 at GFG.main(GFG.java:18) I am getting this, can you please check yours, I have reported this issue, even with your code this is coming for a very big test case

    • @aizad786iqbal
      @aizad786iqbal 12 днів тому

      that error is now fixed and only shown when using as custom input, data is too huge more than 50, 000 chars that's why my code gets this, even though it's same as yours, except variables names.... even chatgpt didn't find any issues and not much difference in our code.. Hangup (SIGHUP) Exception in thread "main" java.lang.StackOverflowError at Solution.dfs(GFG.java:47) at Solution.dfs(GFG.java:47) at Solution.dfs(GFG.java:47) at Solution.dfs(GFG.java:47) at Solution.dfs(GFG.java:47) at Solution.dfs(GFG.java:47) at Solution.dfs(GFG.java:47) at Solution.dfs(GFG.java:47) at Solution.dfs(GFG.java:47) at Solution.dfs(GFG.java:47) at Solution.dfs(GFG.java:47) at Solution.dfs(GFG.java:47) at Solution.dfs(GFG.java:47) at Solutio

  • @kartikkaushik4743
    @kartikkaushik4743 13 днів тому

    Hi u were stammering a lot can u pls speak in hindi

  • @tarifahmed4956
    @tarifahmed4956 14 днів тому

    great explanation bhaiya

  • @tusharjainchintu
    @tusharjainchintu 15 днів тому

    Kal se kuch n kuch problem aari hai geeksforgeeks mai code bhe sahi hota hai, fir bhe problm aari hai..

  • @MRDELL-mc6zo
    @MRDELL-mc6zo 15 днів тому

    what if there are more than two elements of frequency more than n/3 ?

    • @amanqureshi3222
      @amanqureshi3222 15 днів тому

      it can not be possible.

    • @PulkitMalhotra
      @PulkitMalhotra 11 днів тому

      The freq. have to be greater than n/3 >n/3 There's only two values possible Let's Take the min. freq a freq = (n/3)+1 b freq = (n/3)+1 n - (a freq) - (b freq) n - (n/3 + 1) - (n/3 + 1) n - 2n/3 - 2 (3n - 2n - 6)/3 (n-6)/3 n/3 - 2 Means third candidate freq is not greater than n/3

  • @aizad786iqbal
    @aizad786iqbal 15 днів тому

    they changed the question now, TC etc and my marks are reduced now as well, 0 marks as it's saying I viewed the solution before successful submit jabki kal sab sahi se submit ho gaya tha

    • @PulkitMalhotra
      @PulkitMalhotra 15 днів тому

      yes, i just checked but the given code still works

    • @aizad786iqbal
      @aizad786iqbal 15 днів тому

      ​@@PulkitMalhotrayeah my code doesn't work now it was working earlier

  • @abhishekKUMAR-ij7nw
    @abhishekKUMAR-ij7nw 16 днів тому

    thanks man, you cleared my doubt

  • @aizad786iqbal
    @aizad786iqbal 16 днів тому

    yeah mera bhi same issue tha, weird question hai, and output expected output sab sahi tha,

    • @PulkitMalhotra
      @PulkitMalhotra 11 днів тому

      GFG having a lot of mistakes these days.

  • @NamanGoyal-t6c
    @NamanGoyal-t6c 16 днів тому

    nice explanation sir ji

  • @digvijaygaikwad4251
    @digvijaygaikwad4251 16 днів тому

    Thank you so much brother

  • @iamdevil9485
    @iamdevil9485 17 днів тому

    nice

  • @test-nature
    @test-nature 24 дні тому

    Thank you!

  • @Vah-y8z
    @Vah-y8z 26 днів тому

    Yr english ni boli jati to ku ghaseetni h

  • @abhishekagrawal896
    @abhishekagrawal896 27 днів тому

    awesome explanation!

  • @harshittyagi3175
    @harshittyagi3175 Місяць тому

    poor explanation skills. Approach is good but explanation is worst!

  • @Storyblocks6969
    @Storyblocks6969 Місяць тому

    sir the solution code is not opening.can u please add another link.

  • @aakshharwani5767
    @aakshharwani5767 Місяць тому

    sir pls use java language

  • @CodeChallengee
    @CodeChallengee Місяць тому

    Can't we do this ???: void sort012(vector<int>& arr) { sort(arr.begin(),arr.end()); }

  • @Storyblocks6969
    @Storyblocks6969 Місяць тому

    the code in description is not opening . can u please recheck it.

    • @PulkitMalhotra
      @PulkitMalhotra Місяць тому

      discuss.geeksforgeeks.org/comment/b12b4cc9-6215-4d88-8213-e1e6c7d81e01/practice

    • @Storyblocks6969
      @Storyblocks6969 Місяць тому

      @@PulkitMalhotra Thanks a lot Sir for your efforts

    • @PulkitMalhotra
      @PulkitMalhotra Місяць тому

      my pleasure

  • @weoweio
    @weoweio Місяць тому

    Do you solve POTD everyday?

  • @sourav_22_11
    @sourav_22_11 Місяць тому

    very well explained brother!! Thanks!!

  • @alokpd2004
    @alokpd2004 Місяць тому

    why this code is giving segmentation fault? class Solution { public: pair<int, bool> solve(vector<vector<pair<int, bool>>>& dp, vector<vector<int>>& grid, int i, int j) { if (i < 0 || j < 0 || i >= grid.size() || j >= grid[0].size()) return {INT_MAX, false}; if (dp[i][j].first != -1) return dp[i][j]; int res = INT_MAX; bool flag = false; auto p = solve(dp, grid, i + 1, j); if (p.second) { res = min(res, p.first); flag = true; } p = solve(dp, grid, i - 1, j); if (p.second) { res = min(res, p.first); flag = true; } p = solve(dp, grid, i, j - 1); if (p.second) { res = min(res, p.first); flag = true; } p = solve(dp, grid, i, j + 1); if (p.second) { res = min(res, p.first); flag = true; } if (!flag) { dp[i][j] = {INT_MAX, false}; } else { dp[i][j] = {grid[i][j] + res, true}; } return dp[i][j]; } int minimumCostPath(vector<vector<int>>& grid) { int n = grid.size(); int m = grid[0].size(); vector<vector<pair<int, bool>>> dp(n, vector<pair<int, bool>>(m, {-1, false})); dp[0][0] = {grid[0][0], true}; auto p = solve(dp, grid, n - 1, m - 1); return p.second ? p.first : -1; } };

  • @Patel_editing5
    @Patel_editing5 Місяць тому

    Sir please java me baniye pl😢ease please please please please please please please please please please please please

  • @GHUMANTUMANAV
    @GHUMANTUMANAV Місяць тому

    why not dp my code not working on case 1114 class Solution { //Function to return the minimum cost to react at bottom //right cell from top left cell. public int minimumCostPath(int[][] grid) { // Code here int row = grid.length; int col = grid[0].length; for(int j =1;j<col;j++) grid[0][j] = grid[0][j]+grid[0][j-1]; for(int i =1;i<row;i++) grid[i][0] = grid[i][0]+grid[i-1][0]; for(int i=1;i<row;i++){ for(int j =1;j<col;j++){ grid[i][j] = grid[i][j] + Math.min(grid[i][j-1],grid[i-1][j]); } } return grid[row-1][col-1]; } }

    • @PulkitMalhotra
      @PulkitMalhotra Місяць тому

      you are only considering top and left direction to find min.

    • @RohitSingh-wt9em
      @RohitSingh-wt9em Місяць тому

      you have to go down right left top

  • @anushkachouhan5996
    @anushkachouhan5996 Місяць тому

    Thank you. I coded myself after understanding your approach.

  • @saurabhmaurya2805
    @saurabhmaurya2805 Місяць тому

    class Solution{ void convertToString(vector<vector<char>> &a,vector<vector<int>> &ans,int n){ //storing col vector<int> temp; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(a[i][j]=='Q') temp.push_back(j+1); } } ans.push_back(temp); } bool isSafe(int row,int col,int n,vector<vector<char>> &a){ //same col for(int i=0;i<row;i++){ if(a[i][col]=='Q') return false; } //top left for(int i=row-1, j=col-1;i>=0 && j>=0;i--, j--){ if(a[i][j]=='Q') return false; } //top right for(int i=row-1, j=col+1;i>=0 && j<n;i--, j++){ if(a[i][j]=='Q') return false; } return true; } void solve(int i,int n,vector<vector<char>> &a,vector<vector<int>> &ans){ if(i==n){ convertToString(a,ans,n); return; } for(int j=0;j<n;j++){ if(isSafe(i,j,n,a)){ a[i][j]='Q'; solve(i+1,n,a,ans); a[i][j]='.'; } } } public: vector<vector<int>> nQueen(int n) { vector<vector<char>> a(n, vector<char>(n,'.')); vector<vector<int>> ans; solve(0,n,a,ans); return ans; } }; thank you !

  • @sanskarchhajed9397
    @sanskarchhajed9397 Місяць тому

    The code in Java is also same

  • @RaviPal-hw5ly
    @RaviPal-hw5ly Місяць тому

    Batsman can also take 5 runs by running between the wicket on last ball?

  • @sachinsharma2937
    @sachinsharma2937 Місяць тому

    tbh knowledge or Approach was Good but explanation or Intuition is not good keep it up👍

  • @rutujraut3547
    @rutujraut3547 Місяць тому

    Amazing approach bro .. Keep it up , thanks for explanation

  • @brijeshgupta1546
    @brijeshgupta1546 Місяць тому

    solution ka link provide kar diya Kro

  • @tanishgotti3659
    @tanishgotti3659 Місяць тому

    Nice

  • @muskanverma425
    @muskanverma425 Місяць тому

    thankyou so much sir

  • @surajdevv
    @surajdevv Місяць тому

    Keep Hard working bro your time will also come

  • @udaykirankorada1771
    @udaykirankorada1771 Місяць тому

    Bhaiya continue ur videos in English only.. Thank you

  • @manasbiswas9249
    @manasbiswas9249 2 місяці тому

    Nice

  • @ankit_yadav11
    @ankit_yadav11 2 місяці тому

    just apply the patter binary search on answers , this is exactly pased on same pattern check my code but it needss few modifications ,plzz correct me class Solution { public: bool check (int mid,int n,int k){ string h = to_string(mid); if(h.size()>n || h.size()<n){ return false; } if(h.size()==n){ if(mid%k>=0){ string r =h; reverse (r.begin(),r.end()); return h==r; } } return false; } string largestPalindrome(int n, int k) { int i=1; int j = 1000000; int ans =-1; while(i<=j){ int mid = (i+j)/2; if(check(mid,n,k)){ ans = j; i= mid+1; } else{ j=mid-1; } } string ok = to_string(ans); return ok; } };

  • @whateverittakes7929
    @whateverittakes7929 2 місяці тому

    good explanation

  • @talwaarkidhaar
    @talwaarkidhaar 2 місяці тому

    bhai bahut hi ganda samjha raha hai... time waste mat kar... mera b 5min waste karwa diye tune...

    • @focusman8801
      @focusman8801 2 місяці тому

      itna bhi ganda nhi tha bhai abhi start hi kar rha hai video banana @PulkitMalhotra bhai tum english - hindi mix kar ke bolo or eventually english mai shift kardo english - hindi mix se confidence badhalo apna video banane ka

    • @talwaarkidhaar
      @talwaarkidhaar 2 місяці тому

      ​@@focusman8801 Bhai... Ye solution galat b hai... This only works because tests are garbage. Imagine a 500x500 matrix where one row is all 10**9 and the rest are random numbers. His code will fail to find a combination that is not from the same row. I someone is looking for a video to improve his knowledge, He doesn't deserve to see a wrong solution... Also, Is bande ne contest khatam hone ke baad real solution b nahi dekha... which means ye banda khud b improve nahi karega.. and baki log ko b galat gyan dega... Sorry pulkit bhai... But please take it as a point to improve....

  • @surajpatra6779
    @surajpatra6779 2 місяці тому

    Why do we need to do b[0] - a[0] becuase priority queue naturally stores the data in max heap format.

    • @PulkitMalhotra
      @PulkitMalhotra 2 місяці тому

      for single data types only. we are having an array as pq elements. so we need to provide the comparator.

  • @deepanshukathuria1163
    @deepanshukathuria1163 2 місяці тому

    Why only top 15 values work fine?

    • @focusman8801
      @focusman8801 2 місяці тому

      yes i also have this doubt please explain why 15 ?

    • @deepanshukathuria1163
      @deepanshukathuria1163 2 місяці тому

      This is not working for below test case: [[5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]

    • @deepanshukathuria1163
      @deepanshukathuria1163 2 місяці тому

      Test cases are week

    • @PulkitMalhotra
      @PulkitMalhotra 2 місяці тому

      For that we need to find top 25 elements. But for bigger testcase this will also fail. I got your point. For 500x500 if testcase are good we need 3x500 top elements.

  • @aryasharma69
    @aryasharma69 2 місяці тому

    In boolean function, how you are returning integer value to a boolean function? plz copy carefully before uploading the video

    • @PulkitMalhotra
      @PulkitMalhotra 2 місяці тому

      I suppose you are pointing to 7:58. Here we are checking req<=k. What it mean is if required value is less than or equal to k it will return true otherwise false. It is checking a condition and returning boolean not int.

  • @behappy_784
    @behappy_784 2 місяці тому

    🤔 hmmm

  • @manud.s7684
    @manud.s7684 2 місяці тому

    Love from Deepanshu bro🫶🏻