Letter Case Permutation | Recursion

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ธ.ค. 2024

ความคิดเห็น • 217

  • @roshanraut2918
    @roshanraut2918 4 ปีที่แล้ว +109

    Succesfully completed this playlist with practice on gfg , interview bit and code forces.
    Preaparing for offcampus internships for product base comapnies.
    Next playlist on backtracking and puzzles.
    Thanks a lot.
    Keep going.
    Helping a lot.
    Good wishes from PVG COET,Pune.

    • @anaysarkar7
      @anaysarkar7 4 ปีที่แล้ว +1

      some tips for off campus ?....

    • @megadevelopment967
      @megadevelopment967 4 ปีที่แล้ว

      m from pune too..

    • @rachanaraut5718
      @rachanaraut5718 4 ปีที่แล้ว

      Hey how are you applying for offcampus? Any suggestions?I am from Pune too😅

    • @aayushisingh3280
      @aayushisingh3280 4 ปีที่แล้ว

      Can you tell the problems that you practised on Codeforces?

    • @uditgaba1450
      @uditgaba1450 4 ปีที่แล้ว +1

      which playlist are you referring for backtracking

  • @NIKHILRANABCE
    @NIKHILRANABCE 3 ปีที่แล้ว +3

    bhaiya , sach bol rha hu , kitna easy way mein explain krte ho yrr
    ..... keep it up

  • @dimpalbhatia5037
    @dimpalbhatia5037 4 ปีที่แล้ว +22

    I write 100% code of above problem by myself without seeing explanation and code.
    Thank you so much for playlist.

    • @derilraju2106
      @derilraju2106 2 ปีที่แล้ว

      ok

    • @aamirhannan9245
      @aamirhannan9245 2 ปีที่แล้ว

      Why in else case, he has only included num for case 1 and not for case 2? any idea!

    • @SidharthYatish
      @SidharthYatish 9 หลายเดือนก่อน

      @@aamirhannan9245 if you are still looking for the answer, the branches are like op1 -> [use the character as such] op2 -> [change case and use the character]. Since its a number, it will only come under op1. There is no "change case" for a number. Thats why a single branch in else part which is only for the number scenario

    • @_DashingAdi_
      @_DashingAdi_ 6 หลายเดือนก่อน

      ​@@aamirhannan9245Because it doesn't matter.
      Output 1 is just a temporary variable he stores the output in that then pushes the number into it. And then calls the recursive function with the new output.
      Then if the next variable in the string is an alphabet it will again divide into two cases. Lower and upper.
      I hope you get it now.

  • @AnupBarman-bd1ju
    @AnupBarman-bd1ju 6 หลายเดือนก่อน +1

    just listened to your question explanation and immediately wrote out the recursive function. didn't even need to think twice. halwa lag raha hain recursion
    the basic you've given is simply mind boggling. can't thank you enough man

  • @heenaagarwal6795
    @heenaagarwal6795 4 ปีที่แล้ว +11

    The more videos I watch of you, the bigger fan I become of you and these beautiful programming questions.

  • @robot3.077
    @robot3.077 4 หลายเดือนก่อน +2

    After print subset I didn't see a single video of recursion and I was able to solve your entire recursion playlist
    thanks Bhaiya You are Elite

    • @Ishatagai12007
      @Ishatagai12007 3 หลายเดือนก่อน +1

      can u tell me whose playlist i should watch for recursion striver or aditya verma

    • @robot3.077
      @robot3.077 3 หลายเดือนก่อน

      @@Ishatagai12007Both are good but I am more familiar with Aditya Verma recursion and DP series so I recommend Aditya Verma.
      You can also prefer Strivers SDE Sheet for question practice.

  • @faizahmad3217
    @faizahmad3217 ปีที่แล้ว +1

    submitted the solution in leetcode in one go
    your teaching level is awesome. thankyou so much for making recursion so easy

  • @preetibhatia5207
    @preetibhatia5207 4 ปีที่แล้ว +64

    I like your "Chalo" 😅😅😊

    • @TheAdityaVerma
      @TheAdityaVerma  4 ปีที่แล้ว +38

      Chalo !! bdiya 😂

    • @ajaysinhrajput2967
      @ajaysinhrajput2967 4 ปีที่แล้ว +8

      @@TheAdityaVerma Great Video bro!!
      I already watched DP and stack but and they are really cool but still i am stuck at Trees and Graphs can you pleases provid guidance for that Thanks!!

    • @himanshuraj5689
      @himanshuraj5689 3 ปีที่แล้ว +1

      you have started loving him

    • @RajeevCanDev
      @RajeevCanDev ปีที่แล้ว +1

      ​@@TheAdityaVermaI like your "cool"😂

  • @cs04abhinavasthana36
    @cs04abhinavasthana36 2 ปีที่แล้ว +1

    The Input output method for generating a recursive tree is just epic..I was able to solve this question without seeing even a single minute of this video..
    The way you build the concepts is just fantabulous.

  • @player-te8tf
    @player-te8tf 2 ปีที่แล้ว +2

    Did this problem myself!
    Aditya bhaiya is jod!!!!!
    and ofc ye leetcode ki medium problem hai ~

  • @mortysanchez361
    @mortysanchez361 4 ปีที่แล้ว +4

    thanks a lot, Bhai for this approach towards recursion problems. earlier i used to feel completely stuck. now at least i can think using the two methods to solve any recursion problem

  • @darshakkumarranpariya867
    @darshakkumarranpariya867 4 ปีที่แล้ว +1

    Number one skills in coding and teaching....

  • @surajpatil3247
    @surajpatil3247 3 ปีที่แล้ว +8

    for python lovers :)
    def permutationFind(inputs,output):
    if len(inputs)==0:
    print(output)
    return
    if inputs[0].isalpha()==True:
    out1 = output
    out2 = output
    out1+=inputs[0].lower()
    out2 += inputs[0].upper()
    inputs = inputs[1:]
    permutationFind(inputs,out1)
    permutationFind(inputs,out2)
    else:
    out1=output
    out1+=inputs[0]
    inputs=inputs[1:]
    permutationFind(inputs,out1)
    return
    inputs="A1B2"
    output=""
    permutationFind(inputs,output)

    • @ramakanttiwari7839
      @ramakanttiwari7839 ปีที่แล้ว

      def letterCasePermutation(self, s: str) -> List[str]:
      if len(s) == 1:
      output = []
      if not ("a"

  • @KumarAcademy
    @KumarAcademy 4 ปีที่แล้ว +33

    Bro r u planning to bring videos on greedy algorithms

  • @villagevibes6472
    @villagevibes6472 4 ปีที่แล้ว +2

    Your all videos are awesome,
    Sandeep jain sir is a great teacher but u are absolute legend.thank you

  • @ajayneman3769
    @ajayneman3769 3 ปีที่แล้ว +1

    Following this playlist from first video and now slowly slowly I don't need to see the explanation and code from the video...
    #RecursionIsFun
    Hats off to ur teaching 👍

  • @ManishKumar-ux5un
    @ManishKumar-ux5un 3 ปีที่แล้ว

    @Aditya sir kya msst ho yaar, itna accha easy tareeka se shayad hin koi aur pdha skta hai. Bhat bhut msst tareeka sikhaye ho!! Thanks bro!!

    • @ManishKumar-ux5un
      @ManishKumar-ux5un 3 ปีที่แล้ว

      @Aditya sir backtracking pe bna do video !!

  • @Shivamkumar-xu6hu
    @Shivamkumar-xu6hu 3 ปีที่แล้ว +1

    Maja aaya ...
    Pehle Ques samjha
    Then khud se tree bana k solve kara
    Phir puri video dekhi ...

  • @pranayghosh1162
    @pranayghosh1162 4 ปีที่แล้ว +7

    positive stuffs we get in 2020,
    thanx for bringing so much relives.... :-D

  • @paragroy5359
    @paragroy5359 3 ปีที่แล้ว +2

    Thanks for the playlist sir....your explanation is extremely good.....how you are able to make things so easy...it is incredible

  • @AnkitKumar-ft5yu
    @AnkitKumar-ft5yu 4 ปีที่แล้ว +14

    Very helpful, I am solving problems on leetcode without hesitation

  • @mayur_madhwani03
    @mayur_madhwani03 3 ปีที่แล้ว +1

    pichhla question karne gaya tha itna sahi samjhaya ki direct yahi question kar aya 😃

  • @akarshjaiswal1622
    @akarshjaiswal1622 4 ปีที่แล้ว +2

    I was able to write the code just after the problem statement explanation...
    You are awesome !

  • @kartik5134
    @kartik5134 ปีที่แล้ว +1

    i can say only one thing that he is underrated

  • @Monkeydluffy-we2fk
    @Monkeydluffy-we2fk 3 ปีที่แล้ว +7

    Where I failed in code:
    1)wrote 2 recursive calls for both the cases (alpha and digit)
    2)in an alphabet case I just converted to upper case and did not convert to lower case 😂
    But still great video 🤗🤗🔥

  • @vipulpachauri5498
    @vipulpachauri5498 3 ปีที่แล้ว +2

    In Java :
    public class LetterCasePermuatation {
    private static final String[] NUMBERS = {"1","2","3","4","5","6","7","8","9","0"};
    public static void main(String[] args) {
    String input = "a1B2";
    String output = "";
    Set set = new HashSet();
    solve(input,output,set);
    System.out.println(set);
    }
    private static void solve(String input, String output, Set set) {
    if(input.length() == 0){
    set.add(output);
    return;
    }
    String output1 = output;
    String output2 = output;
    String temp = "";
    temp += input.charAt(0);
    if(!Arrays.asList(NUMBERS).contains(temp)){
    output1 += temp.toUpperCase();
    output2 += temp.toLowerCase();
    input = input.substring(1);
    solve(input,output1,set);
    solve(input,output2,set);
    }else {
    output1 += input.charAt(0);
    input = input.substring(1);
    solve(input,output1,set);
    }
    }
    }

    • @RohitGupta-xf3zp
      @RohitGupta-xf3zp ปีที่แล้ว

      public class LetterCasePermutaion {
      static void permute(String ip,String op){
      if(ip.length()==0){
      System.out.println(op);
      return;
      }
      if(Character.isDigit(ip.charAt(0))){
      String opp=op+ip.charAt(0);
      //include kr ke chote input kr ke recursive call krna hein
      ip=ip.substring(1);
      permute(ip,opp);
      }
      else if(Character.isAlphabetic(ip.charAt(0))){
      //i dont know wheteher the character is lower case and upper case
      //but for one we have to add the upper case and for the other we have to add the lower case
      String op1=op+Character.toUpperCase(ip.charAt(0));
      String op2=op+Character.toLowerCase(ip.charAt(0));
      ip=ip.substring(1);
      permute(ip,op1);
      permute(ip,op2);
      }
      }
      public static void main(String[] args) {
      String ip="a1B1";
      String op="";
      permute(ip,op);
      }
      }

  • @amruthachowdary5697
    @amruthachowdary5697 4 ปีที่แล้ว +5

    Bro y u not uploading videos

  • @AnkitSingh-vp7mj
    @AnkitSingh-vp7mj 4 ปีที่แล้ว +5

    First 1 to view .. Love your videos brother.. Please upload a playlist for Graphs and Trees :)

  • @simply_akh1l
    @simply_akh1l หลายเดือนก่อน +1

    done myself , thanks a ton

  • @prateekization
    @prateekization 4 ปีที่แล้ว +4

    bro,when is next video coming,eagerly waiting

  • @ayusmanarya3796
    @ayusmanarya3796 3 ปีที่แล้ว +1

    Next playlist on backtracking and puzzles and on greedy algorithms

  • @ashishmaurya3409
    @ashishmaurya3409 4 ปีที่แล้ว +3

    Sir aap video kyon upload ni kar rhe??

  • @tusharagarwal6155
    @tusharagarwal6155 4 ปีที่แล้ว +2

    Bhai how to solve Josephus problem using IP-OP approach or IBH approach??

  • @BharatiSubramanian99217
    @BharatiSubramanian99217 3 ปีที่แล้ว +2

    Wonderfully explained!

  • @Shenkeyful
    @Shenkeyful 4 ปีที่แล้ว +1

    Great work brother!
    Very helpful!
    Thanks a lot!
    Keep it up...

  • @villagevibes6472
    @villagevibes6472 4 ปีที่แล้ว +5

    İs this completion of recursion or more videos are about to come.

  • @gauravgupta9477
    @gauravgupta9477 4 ปีที่แล้ว

    Convert the input string all into lowercase....and then also can solve the problem the way you did in the last video. just take a special condition (Only one child) in case of digits. Else two child in case of letters.

  • @shaurydeep
    @shaurydeep 2 ปีที่แล้ว

    tried another approach:
    void solve(vector&res,string temp,string s,int i)
    {
    if(i==s.size())
    {
    res.push_back(temp);
    return;
    }

    temp.push_back(char(tolower(s[i]))); //push the chsar in temp even if it is a digit

    solve(res,temp,s,i+1); //recurse for next
    temp.pop_back(); //pop it for backtrack
    if(s[i]>=48 && s[i]

  • @nityanandbhaskar2155
    @nityanandbhaskar2155 4 ปีที่แล้ว +1

    thanks for another great video. Looking forward for backtracking series.

  • @arijitindu7169
    @arijitindu7169 4 ปีที่แล้ว

    i had faced difficulties in Recursion...but now it is clear for me...thanks a lot from my heart.....pls make more vedios....we all are with u....

  • @Debugging-Life-f4f
    @Debugging-Life-f4f 3 ปีที่แล้ว +2

    class Solution {
    public:
    vector ans;
    void Solve(string s, string &output)
    {
    if(s.length()==0)
    {
    ans.push_back(output);
    return;
    }
    else
    {
    if(isdigit(s[0]))
    {
    string output1 = output;
    output1.push_back(s[0]);
    s.erase(s.begin()+0);
    Solve(s,output1);
    }
    else
    {
    string output2 = output;
    string output3 = output;
    output2.push_back(isupper(s[0]));
    output3.push_back(islower(s[0]));
    s.erase(s.begin()+0);
    Solve(s,output2);
    Solve(s,output3);
    }
    }
    }
    vector letterCasePermutation(string s) {
    string output = "";
    Solve(s,output);
    return ans;
    }
    };
    can anyone look what is the problem with this code ?

    • @anuragsinghal8451
      @anuragsinghal8451 ปีที่แล้ว

      class Solution {
      public:
      vector ans;
      void Solve(string input, string output)
      {
      if(input.length()==0)
      {
      ans.push_back(output);
      return;
      }
      if(isalpha(input[0]))
      {
      string op2 = output;
      string op3 = output;
      op2.push_back(tolower(input[0]));
      op3.push_back(toupper(input[0]));
      input.erase(input.begin()+0);
      Solve(input,op2);
      Solve(input,op3);
      }
      else
      {
      string op1 = output;
      op1.push_back(input[0]);
      input.erase(input.begin()+0);
      Solve(input,op1);
      }
      }
      vector letterCasePermutation(string s) {
      Solve(s,"");
      return ans;
      }
      };

  • @NotNotNithin
    @NotNotNithin 3 ปีที่แล้ว +3

    Java 8 solution:
    public class LetterCaseChangeRecursive {
    public static void main(String[] args) {
    String ip = "a1B2";
    String op = "";
    List output = new ArrayList();
    List result = solve(ip, op, output);
    result.forEach(System.out::println);
    }
    public static List solve(String ip, String op, List result) {
    if (ip.isEmpty()) {
    result.add(op);
    return result;
    }
    String op1 = op, op2 = op;
    if (Character.isDigit(ip.charAt(0))) {
    op += ip.charAt(0);
    ip = ip.substring(1);
    solve(ip, op, result);
    } else {
    op1 += ip.toLowerCase().charAt(0);
    op2 += ip.toUpperCase().charAt(0);
    ip = ip.substring(1);
    solve(ip, op1, result);
    solve(ip, op2, result);
    }
    return result;
    }
    }

  • @priyankarai7947
    @priyankarai7947 3 ปีที่แล้ว +2

    I am having interested in Google in one month. How should I prepare for data structure and algorithm questions

  • @iam_khalid
    @iam_khalid 4 ปีที่แล้ว +2

    This is not working on string "RmR"...please explain

    • @grovestreet9165
      @grovestreet9165 4 ปีที่แล้ว

      it is working on Rmr here is my code #include
      using namespace std;
      void letter_case_permutation(string ip,string op){
      // base condition
      if(ip.size()==0){
      if(op.empty())
      return;
      cout

  • @avinashukla07
    @avinashukla07 4 ปีที่แล้ว +2

    Sir Back-Tracking ko bhi samjao
    please

  • @nikitajaiswal9112
    @nikitajaiswal9112 2 ปีที่แล้ว

    class Solution:
    def helper(self,s,op):
    if len(s)==0:
    print(op)
    return

    if s[0].isdigit():
    op1=op+s[0]
    s=s[1:]
    self.helper(s,op1)
    else:
    op1=op+s[0].lower()
    op2=op+s[0].upper()
    s=s[1:]
    self.helper(s,op1)
    self.helper(s,op2)

  • @NewBIE-xz5jm
    @NewBIE-xz5jm 11 หลายเดือนก่อน +1

    easy! did in one go

  • @Rahul-bl6rv
    @Rahul-bl6rv 4 ปีที่แล้ว +2

    Bhai new video nhi ayi

  • @yelp9359
    @yelp9359 4 ปีที่แล้ว +1

    Aur v vedios aa rahe hai is playlist me ???

  • @shubhampokhriyal8491
    @shubhampokhriyal8491 4 ปีที่แล้ว +2

    Bhaiya next video kb aaegi

  • @ashisharora0077
    @ashisharora0077 4 ปีที่แล้ว

    make videos on these questions
    *> Replace Pi with digits
    Input : str = “pippppiiiipi”
    Output : 3.14ppp3.14iii3.14
    Input : str = “pip”
    Output : 3.14p
    Input : str = “xpix”
    Output : x3.14x
    *> String to integer conversion recursive

    • @AkshayKumar-kz6zh
      @AkshayKumar-kz6zh 4 ปีที่แล้ว

      isme string matching lagegi.. KPM se ho jaega..

  • @abhishekk1231
    @abhishekk1231 4 ปีที่แล้ว +1

    We can simply convert the entered string in lowercase and solution will be same as previous video

  • @himanshubajaj2566
    @himanshubajaj2566 4 ปีที่แล้ว +3

    Brother yrr video banani start kardo wapas kitna aur wait karna padega

  • @auroshisray9140
    @auroshisray9140 3 ปีที่แล้ว +1

    Recursion is beautiful and magucal

  • @divyanshdixit4944
    @divyanshdixit4944 4 ปีที่แล้ว +2

    Maybe you can show us to solve basic DP problems (not covered in DP series) with recursion to build up the concept.

  • @sunnykakrani7830
    @sunnykakrani7830 4 ปีที่แล้ว

    simple code :
    #include
    using namespace std;
    char lowercase(char ch)
    {
    if(ch>=97 && ch=65 && ch

  • @hasankhan4585
    @hasankhan4585 8 หลายเดือนก่อน +1

    class Solution {
    public:
    void solve(string s,int index,vector&ans,string output){
    if(index==s.size()){
    ans.push_back(output);
    return;
    }
    //including the letters
    if((s[index]>='a' && s[index]='A' && s[index]

  • @NikhilSingh-jx1ch
    @NikhilSingh-jx1ch 4 ปีที่แล้ว +2

    backtracking and graph and DP ki playlist complete kardo bhaiya plzz!

  • @gokusaiyan1128
    @gokusaiyan1128 2 ปีที่แล้ว

    def solve(output, s):
    if len(s) == 0:
    print(output)
    return
    else:
    if s[0].isalpha():
    solve(output + s[0].lower(), s[1:])
    solve(output + s[0].upper(), s[1:])
    else:
    solve(output + s[0], s[1:])
    s = "a1B2"
    output = ""
    solve(output, s)

  • @mohit84604
    @mohit84604 2 ปีที่แล้ว

    for javascript lovers
    you maybe wondering why i had used loop
    because javascript cannot configure directly a number inside an string
    so i transoform it inot an array
    let i = 1
    function solve(inp,out){
    if(inp.length == 0){
    console.log(out)
    return;
    }
    if(typeof(inp[0]) == "string"){
    let op1 = out
    op1 += inp[0].toLowerCase()
    let op2 = out;
    op2 += inp[0].toUpperCase()
    inp = inp.slice(1)
    solve(inp,op1)
    solve(inp,op2)
    }else{
    let op = out
    op += inp[0]
    inp = inp.slice(1)
    solve(inp,op)
    }
    return
    }
    function main (string){
    let array = []
    for(let i = 0; i

  • @aamirhannan9245
    @aamirhannan9245 2 ปีที่แล้ว

    Why in else case, he has only included num for case 1 and not for case 2? any idea!

  • @ayushagrawal258
    @ayushagrawal258 4 ปีที่แล้ว +2

    Is the recursion playlist completed or are more videos coming?

  • @arshgupta2891
    @arshgupta2891 4 ปีที่แล้ว +3

    Bhaiya graphs ki playlist ka plan hai koi future me?

    • @TheAdityaVerma
      @TheAdityaVerma  4 ปีที่แล้ว +12

      Bhai plan sbka to sbka hai !! pr aadmi ek aur data structures anek !!

    • @TheAdityaVerma
      @TheAdityaVerma  4 ปีที่แล้ว +15

      Most probably next will backtracking and then graphs.

    • @arshgupta2891
      @arshgupta2891 4 ปีที่แล้ว +6

      @@TheAdityaVerma bhaiya subscribers bhi to anek honge ek din!!!!

    • @AbhinandanSharmaiisc2017
      @AbhinandanSharmaiisc2017 4 ปีที่แล้ว +9

      @@TheAdityaVerma bro tu bhagwan ka bheja hua farista hai. bhai tu padhata nai h tu aag laga deta hai.

  • @TulitPal
    @TulitPal 6 หลายเดือนก่อน

    Java code to help anyone confused 😊
    class Solution {
    HashSet set;
    public List letterCasePermutation(String s) {
    set = new HashSet();
    ArrayList result = new ArrayList();
    constructPermutations(s.toLowerCase(), "");
    for (String ele : set) result.add(ele);
    return result;
    }
    private void constructPermutations(String i, String o) {
    if (i.length()

  • @BestOfSharkTankIndia
    @BestOfSharkTankIndia 4 ปีที่แล้ว +1

    Bhai aap baki data structure ka bhi banaoge na? Like linked List, trees and all?

  • @himanshumalik6913
    @himanshumalik6913 2 ปีที่แล้ว +2

    Java Code:
    class Solution {
    public List letterCasePermutation(String s) {
    String ip = s;
    String op = "";
    List res = new ArrayList();
    solve(ip, op, res);
    return res;
    }
    public void solve(String ip, String op, List res){
    if(ip.length() == 0){
    res.add(op);
    return;
    }
    if(Character.isAlphabetic(ip.charAt(0))){
    String op1 = op;
    String op2 = op;
    op1 += Character.toLowerCase(ip.charAt(0));
    op2 += Character.toUpperCase(ip.charAt(0));
    ip = ip.substring(1);
    solve(ip, op1, res);
    solve(ip, op2, res);
    }
    else{
    String op1 = op;
    op1 += ip.charAt(0);
    ip = ip.substring(1);
    solve(ip, op1, res);
    }
    }
    }

  • @code7434
    @code7434 4 ปีที่แล้ว +1

    Bro ab complex problems daala kro , u r amazing.

  • @ritikapandey3473
    @ritikapandey3473 2 ปีที่แล้ว

    Where are you nowadays,like can't see your recent videos

  • @PritamKumar-mr5dv
    @PritamKumar-mr5dv 3 ปีที่แล้ว +1

    Bhaiya thanks you , i love u 3000

  • @himalayagupta7744
    @himalayagupta7744 2 ปีที่แล้ว +1

    already solved this one too

  • @dipesh1401
    @dipesh1401 3 ปีที่แล้ว +1

    JAVA CODE:-
    public class Main {
    public static void main(String[] args) {
    String str="a1B2";
    String op="";
    plc(str,op);
    }
    static void plc(String str,String op)
    {
    if(str.length()==0)
    {
    System.out.println(op);
    return;
    }
    if(Character.isDigit(str.charAt(0)))
    {
    plc(str.substring(1), op+str.charAt(0));
    return;
    }
    plc(str.substring(1), op+""+str.toUpperCase().charAt(0));
    plc(str.substring(1), op+""+str.toLowerCase().charAt(0));
    }
    }

  • @AR-nw6dv
    @AR-nw6dv 2 ปีที่แล้ว +1

    Agar Aditya bhai graph and tree daal dete u tube par sabhka kaam khatam ho jataa 🤣🤣🤣🤣

  • @justjoy7179
    @justjoy7179 4 ปีที่แล้ว +1

    Sir, Greedy Algorithms and Divide and Conquer ki bhi playlist banado...pleassseeeeee!!!!

  • @anshumallick3461
    @anshumallick3461 4 ปีที่แล้ว +4

    bhaiya apne company me referrel dijiega?

  • @vivekchaudhary1768
    @vivekchaudhary1768 2 ปีที่แล้ว

    Gaurav, bhai one doubt in recursion some time we loop on the string some time we put two recursive call. How to decide?

  • @sarthaksarangi
    @sarthaksarangi ปีที่แล้ว

    class Solution {
    public List letterCasePermutation(String s) {
    List ans = new ArrayList();
    solve(s,ans,"");
    return ans;
    }
    public void solve(String s , List ans , String op){
    if(s.length() == 0){
    ans.add(op);
    return;
    }
    char ch = s.charAt(0);
    s = s.substring(1);
    if(Character.isLetter(ch)){
    //Convert into lowercase and call the recursive function
    solve(s,ans,op+ Character.toLowerCase(ch));
    solve(s,ans,op+ Character.toUpperCase(ch));
    }
    else{ // Digit encountered
    //Directly append into the output
    solve(s,ans,op+ch);
    }
    }
    }

  • @bikashsah6338
    @bikashsah6338 4 ปีที่แล้ว +1

    Divide n conquer based problems ki playlist plzzz bhai

  • @NaveenSharma-pc5ej
    @NaveenSharma-pc5ej 4 ปีที่แล้ว +1

    please explain this question Find Maximum number possible by doing at-most K swaps

  • @kushagrasrivastava1443
    @kushagrasrivastava1443 2 ปีที่แล้ว

    code:
    class Solution {
    void solve(vector &ans, string s, string S){
    if(!s.length()) {ans.push_back(S); return;}
    S=s.back() + S;
    s.pop_back();
    solve(ans, s, S);
    if(!isdigit(S[0])) {S[0] ^= ' ';
    solve(ans, s, S);}
    }
    public:
    vector letterCasePermutation(string s) {
    vector ans;
    string S="";
    solve(ans, s, S);
    return ans;
    }
    };

  • @sanidhyagupta1906
    @sanidhyagupta1906 4 ปีที่แล้ว +2

    Bhaiya please video upload krdo graph pr bilkul 0 se...

  • @adityamaheshwari4250
    @adityamaheshwari4250 ปีที่แล้ว

    Can anyone share the problem link?

  • @techbenchers69
    @techbenchers69 4 ปีที่แล้ว +1

    Please make videos on tilling problem

  • @dhairyaanchal8623
    @dhairyaanchal8623 2 ปีที่แล้ว

    Python Code:-
    def solve(input,output):
    if(len(input)==0):
    print(output)
    return
    if input[0].isalpha()==True:
    output1=output
    output2=output
    output1+=input[0].lower()
    output2+=input[0].capitalize()
    input=input[1:]
    solve(input,output1)
    solve(input,output2)
    else:
    output1=output
    output1+=input[0]
    input=input[1:]
    solve(input,output1)

    return
    input="a1B2"
    output=""
    solve(input,output)

  • @nitish2283
    @nitish2283 3 ปีที่แล้ว +1

    Need to find only unique strings.In main function we need to use map and print only unique strings

  • @kapilvarshney9518
    @kapilvarshney9518 2 ปีที่แล้ว

    Anybody seeing this vdo In 2022 and why aditya sir do not posting any video...

  • @nikhiltewari7165
    @nikhiltewari7165 3 ปีที่แล้ว

    How to generate all the permutations of a string? Can you please make a video on this problem using I/p O/p method

  • @Prateek_Mantry
    @Prateek_Mantry 8 หลายเดือนก่อน +1

    thank you.

  • @sumitkeshav4718
    @sumitkeshav4718 4 ปีที่แล้ว

    Is the recursion playlist over ?

  • @sumitkeshav4718
    @sumitkeshav4718 4 ปีที่แล้ว

    Bhai aap graphs start kr skte hai pls?

  • @krishnaprasad3350
    @krishnaprasad3350 4 ปีที่แล้ว

    Bhai great explanations as usual.
    What about extended input output method problems?

  • @samchau8011
    @samchau8011 4 ปีที่แล้ว +1

    I tried becoming a patron of you but payment only through credit card .. can you add payment through debit card as well!

  • @arnavraj3415
    @arnavraj3415 3 ปีที่แล้ว

    how to compute normal permutations with this method

  • @mustafadahodwala4465
    @mustafadahodwala4465 4 ปีที่แล้ว

    Sir yeh question ka approach kya hai
    Print all combinations of factors in C.

  • @bruh-moment-21
    @bruh-moment-21 ปีที่แล้ว

    class Solution {
    public:
    void dfs(string& s, vector& res, string curr, int i) {
    if(curr.length() == s.length()) {
    res.push_back(curr);
    return;
    }
    char c = s[i];

    if(isalpha(c)) {
    // left: small
    string lcurr = curr;
    lcurr.push_back(tolower(c));
    dfs(s, res, lcurr, i + 1);
    // right: caps
    string rcurr = curr;
    rcurr.push_back(toupper(c));
    dfs(s, res, rcurr, i + 1);
    } else {
    curr.push_back(c);
    dfs(s, res, curr, i + 1);
    }
    }
    vector letterCasePermutation(string s) {
    vector res;
    string curr;
    dfs(s, res, curr, 0);
    return res;
    }
    };

  • @ravikamble8142
    @ravikamble8142 4 ปีที่แล้ว

    very helpfull ....plz make an video on how to calculate space complexity of any program in any language?

  • @tecHSonic
    @tecHSonic 4 ปีที่แล้ว +2

    bhai Edit distance aur Bursting Baloon ka bhi video daal do mko tushar roy ka video nhi dekhna😂😂

  • @UECDishaKhattri
    @UECDishaKhattri 4 ปีที่แล้ว

    @aditya verma please reply recursion ki playlist khatam toh nhi hui naa abhi? aur videos kab aenge?

  • @divyanshdimri8567
    @divyanshdimri8567 4 ปีที่แล้ว +1

    bhai please start backtracking series please 🙏. placements r going on help us . and i would beg u to start on miscellaneous questions series in which u cover imp question on placements .

  • @deenquotes786
    @deenquotes786 4 ปีที่แล้ว

    "Jedi" 🤩🤩

  • @kartikking7
    @kartikking7 3 ปีที่แล้ว

    Bhaiya , we can change the input given to us into all small cases by looping on it 😅😅😁😁