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
Просмотров 9019 часов назад
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
Просмотров 19921 час назад
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
Просмотров 18223 часа назад
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
Просмотров 52День назад
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
Просмотров 71День назад
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
Просмотров 287День назад
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
Просмотров 174День назад
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
Просмотров 188День назад
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
Просмотров 99День назад
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 7 дней назад

      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 8 дней назад

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

  • @abhishekagrawal896
    @abhishekagrawal896 11 дней назад

    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 12 дней назад

    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) : ruclips.net/video/JCDxVovAIRo/видео.html

  • @harsh-pandey
    @harsh-pandey 12 дней назад

    Keep it up brother

  • @aizad786iqbal
    @aizad786iqbal 13 дней назад

    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 14 дней назад

    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 16 дней назад

    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 16 дней назад

      yes, i just checked but the given code still works

    • @aizad786iqbal
      @aizad786iqbal 16 дней назад

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

  • @abhishekKUMAR-ij7nw
    @abhishekKUMAR-ij7nw 16 дней назад

    thanks man, you cleared my doubt

  • @aizad786iqbal
    @aizad786iqbal 17 дней назад

    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 17 дней назад

    nice explanation sir ji

  • @digvijaygaikwad4251
    @digvijaygaikwad4251 17 дней назад

    Thank you so much brother

  • @iamdevil9485
    @iamdevil9485 18 дней назад

    nice

  • @test-nature
    @test-nature 24 дня назад

    Thank you!

  • @Vah-y8z
    @Vah-y8z 26 дней назад

    Yr english ni boli jati to ku ghaseetni h

  • @abhishekagrawal896
    @abhishekagrawal896 28 дней назад

    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🫶🏻