2161. Partition Array According to Given Pivot || LeetCode 2161 || Biweekly LeetCode 71

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 4. 02. 2022
  • Here in this video we have discussed the approach to solve
    2161 Minimum Sum of Four Digit Number After Splitting Digits of Biweekly Contest 71 .
    Question Link :- leetcode.com/contest/biweekly...
    Code Link :-
    Presenting you the best placement preparation course document down here
    👇(You can download the sheet and use it as a tracker as per your convenience).
    ⭐ Link for the Bro Coders PPC sheet:- onedrive.live.com/view.aspx?r... After this if you need doubt support join our telegram channel for getting it solved
    đŸ‘‡đŸ»
    🔔Join the telegram channel for doubts and discussions:-t.me/joinchat/wSYWX-gbgoRjNmNl
    If you follow this course in sequential manner it would be most optimal. Otherwise if you are at intermediate level and want selective preparation of any particular topic you can jump directly, otherwise it's not suggested. And also since it's our new endeavor to help out students with quality education free of cost . So please help us in this mission!!!
    ❇ Like, Share, Subscribe!!
    ========================================================================
    🔔Follow us on Instagram:- / bro_codrs
    🔔Join the telegram channel for doubts and discussions:-t.me/joinchat/wSYWX-gbgoRjNmNl
    ========================================================================
    Link to our other major series:-
    ✅Dynamic Programming: czcams.com/users/playlist?list...
    ✅Recursion: czcams.com/users/playlist?list...
    ✅Backtracking: czcams.com/users/playlist?list...
    ✅Greedy: czcams.com/users/playlist?list...
    ✅Array: czcams.com/users/playlist?list...
    ✅Hashing: czcams.com/users/playlist?list...
    ✅Linked List: czcams.com/users/playlist?list...
    ✅Binary Search Tree : ‱ Search in a Binary Sea...
    ✅Binary Tree : ‱ Binary Tree -Course In...
    ✅Stack : ‱ Parenthesis Checker |...
    ✅Queue : ‱ Queue Basics and STL||...
    ✅Maths: ‱ Find factors , check f...
    ========================================================================
    đŸ”±To buy books at excessive cheap prices and sell your old books, visit :- www.bookstop.me
    ========================================================================
    For convenience, refer to given timestamps:-
    ========================================================================
    #BroCoders #LeetCode #InteviewBits #GFG #PlacementCourse #dp #stack #queue #maths #greedy #array #binaryTree #BST #Graphs #recursion #backtracking #string #stl #c++ #java #DSA #CompetitveProgramming #CodeForces #CodeChef #ICPC #CompetitiveCoding #FreePlacementSeries #Microsoft #Google #Amazon #Apple #Facebook #FlipKart #Netflix #TowerResearch #VMWare #DirectI #CodeNation #Infosys #GoldmanSachs #TCS #Tier3 #IIT #NIT #IIIT #Interview #Aptitude #Contest #CodingContest #HackerRank #HackerEarth #BinarySearch #BroCode #Trending #PlacementUpdates #PlacementNotification #IntenshipUpdates #InternshipNotification #LinkedIn #Samsung #Naukri #SoftwareEngineer #Hackathon #SoftwareDevelopmentEngineer #SDE #IT #ComputerScience #CSE #FAANG #DynamicProgramming #2129#LeetCode #CapitalisetheTitle #BiweeklyLeetCode
    Biweekly70 #2129 #solution #answer #Fastest_answer
    2161. Partition Array According to Given Pivot || LeetCode 2161 || Biweekly LeetCode 71
    2161. Partition Array According to Given Pivot || LeetCode 2161 || Biweekly LeetCode 71
    2161. Partition Array According to Given Pivot || LeetCode 2161 || Biweekly LeetCode 71
    2161. Partition Array According to Given Pivot || LeetCode 2161 || Biweekly LeetCode 71

Komentáƙe • 24

  • @AnkitSharma-jk2wx
    @AnkitSharma-jk2wx Pƙed rokem +1

    ram ram bhiya .. jai siya ram

  • @pritishpattnaik4674
    @pritishpattnaik4674 Pƙed 2 lety +1

    very nice approach for contests

    • @BroCoders
      @BroCoders  Pƙed 2 lety

      Glad you liked it

    • @imshivendra
      @imshivendra Pƙed 2 lety

      can anyone correct me why I m getting wrong output
      class Solution {
      public:
      vector pivotArray(vector& nums, int pivot) {


      int start=0;
      int end=nums.size()-1;
      int run=0;

      while(run

  • @imshivendra
    @imshivendra Pƙed 2 lety +1

    can anyone correct me why I m getting wrong output
    class Solution {
    public:
    vector pivotArray(vector& nums, int pivot) {


    int start=0;
    int end=nums.size()-1;
    int run=0;

    while(run

    • @BroCoders
      @BroCoders  Pƙed 2 lety

      You have not maintained the order of array in case of end pointer, if say 12 comes and then 11 and your pivot is 10. So, your code is first pushing 12 towards the end and then pushing 11 before it but is should be opposite 12 succedded by 11.
      I hope you understand

    • @BroCoders
      @BroCoders  Pƙed 2 lety

      You have not maintained the order of array in case of end pointer, if say 12 comes and then 11 and your pivot is 10. So, your code is first pushing 12 towards the end and then pushing 11 before it but is should be opposite 12 succedded by 11.
      I hope you understand

  • @abhijitroy1958
    @abhijitroy1958 Pƙed 2 lety +1

    for a sec i had a thought of this sol ,but later i use swap function and 2 pointers

    • @BroCoders
      @BroCoders  Pƙed 2 lety

      That comes but during contest we have to be fast!!

    • @abhijitroy1958
      @abhijitroy1958 Pƙed 2 lety

      @@BroCoders yes, that's why I was able to solve only 2

    • @imshivendra
      @imshivendra Pƙed 2 lety

      Abhijeet Bro i also used swap function and two pointers approach but i am getting wrong output can you correct me?
      class Solution {
      public:
      vector pivotArray(vector& nums, int pivot) {


      int start=0;
      int end=nums.size()-1;
      int run=0;

      while(run

    • @abhijitroy1958
      @abhijitroy1958 Pƙed 2 lety +1

      @@imshivendra your answer is all good brother but the end pointer is not allowing you to print the answer in input sequential manner so it's throwing error . I used an extra space for this case else I have also written the same code before and faced the error

    • @imshivendra
      @imshivendra Pƙed 2 lety

      @@abhijitroy1958 Bro if you won't mind please share your code

  • @daku2op926
    @daku2op926 Pƙed 2 lety +1

    please 3rd and 4th bhi daldo bro😄

    • @BroCoders
      @BroCoders  Pƙed 2 lety

      Almost there!! video coming in few minutes!!

    • @imshivendra
      @imshivendra Pƙed 2 lety

      can anyone correct me why I m getting wrong output
      class Solution {
      public:
      vector pivotArray(vector& nums, int pivot) {


      int start=0;
      int end=nums.size()-1;
      int run=0;

      while(run

    • @imshivendra
      @imshivendra Pƙed 2 lety

      @@BroCoders can anyone correct me why I m getting wrong output
      class Solution {
      public:
      vector pivotArray(vector& nums, int pivot) {


      int start=0;
      int end=nums.size()-1;
      int run=0;

      while(run

  • @rohithchittibommala2002
    @rohithchittibommala2002 Pƙed 2 lety +1

    Suggestion is don't use #tags in description, CZcams reduces reach instead use just words like #Internship to
    Internship

    • @BroCoders
      @BroCoders  Pƙed 2 lety

      Thanks bhai!!
      Will implement from upcoming videos!!

    • @rohithchittibommala2002
      @rohithchittibommala2002 Pƙed 2 lety +1

      ​@@BroCoders it is very minute help when compared to your help

    • @BroCoders
      @BroCoders  Pƙed 2 lety

      @@rohithchittibommala2002 😊😊

    • @imshivendra
      @imshivendra Pƙed 2 lety

      class Solution {
      public:
      vector pivotArray(vector& nums, int pivot) {


      int start=0;
      int end=nums.size()-1;
      int run=0;

      while(run