93. Restore IP Addresses

PROBLEM LINK : leetcode.com/problems/restore...
SOLUTION LINK : github.com/niveditaprity/Leet...

Пікірлер: 15

  • @priyanshumauryakrishna2146
    @priyanshumauryakrishna2146 Жыл бұрын

    👍

  • @soubhikghosh6564
    @soubhikghosh6564 Жыл бұрын

    A nice question on Recursion!

  • @ayushverma3261
    @ayushverma3261 Жыл бұрын

    Well Explained Nivedita..

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Thank you :) must share with your friends

  • @158_mdparwezzafar6
    @158_mdparwezzafar6 Жыл бұрын

    excellent explanation like striver. 👌👌

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Thank you 😄

  • @harshk3351
    @harshk3351 Жыл бұрын

    Ma'am In starting of solve we can add below condition as well correct: here I am trying to remove extra calls if((s.length() - i) > (4 - part) * 3 || (s.length() - i) return; }

  • @yashchamoli8695
    @yashchamoli8695 Жыл бұрын

    didi you are superb aap bahut aacha aur to the point padate ho thankyou didii i just need your aashirwad for better future please diiiiiiiiidiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 🙏🙏🙏🙏🙏🙏🙏🙏🙏

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Welcome :) , learning pe focus kro future fir to bright hi bright hai

  • @yashchamoli8695

    @yashchamoli8695

    Жыл бұрын

    @@techadorabynivedita 🙏

  • @mrinalmadhav8119
    @mrinalmadhav8119 Жыл бұрын

    Nice explain

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Thank you :) must share with your friends

  • @ignite_your_power
    @ignite_your_power Жыл бұрын

    Thankyou

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Welcome :)

  • @ManojKrVerma-vw4dx
    @ManojKrVerma-vw4dx Жыл бұрын

    bool is_valid_octet(string s) { int n = s.length(); if (n > 1 && s[0] == '0') { return false; } int num = stoi(s); if (num >= 0 and num 3 ) return; if (sz == 3) { temp.push_back(s.substr(idx)); string str = ""; for(string sr: temp){ if (is_valid_octet(sr) == false){ temp.pop_back(); return; } str += sr; str += "."; } temp.pop_back(); str.pop_back(); ans.push_back(str); return; } for(int i = idx + 1, len = 1; i temp.push_back(s.substr(idx, len)); helper(s, ans, temp, temp.size() , i); temp.pop_back(); } } vector restoreIpAddresses(string s) { int n = s.length(); if (n return {}; vector ans; vector temp; helper(s, ans, temp, 0, 0); return ans; } }; Why am I getting stoi error ? anyone please help

Келесі