Convert Binary Number in a Linked List to Integer Leetcode #1 | Data Structure & Algorithm Hindi |

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2024
  • This is the video under the series of DATA STRUCTURE & ALGORITHM. We are going to solve a Question from Leetcode. The question is from the Topics Data structure. A full easy concept in Hindi.
    We also Provide courses on Competitive Programming and Data structure. Please see our Full Playlist on our Channel.
    ----------------------------------------------------------------------------------------
    ►Data Structure: • Data Structures with C...
    ----------------------------------------------------------------------------------------
    ► Problem Link: leetcode.com/p...
    *Follow me on LinkedIn *
    LinkedIn► / iamprince
    *Follow me on Facebook *
    Facebook► / helloworldofficials
    *Follow me on Instagram *
    Instagram► / helloworldbyprince
    *Follow me on Twitter *
    Twitter► / prince_king_
    ----------------------------------------------------------------------------------------
    Code of this video: - - - - - - - - - - - - - - - - - - - - - -
    Pdf of this video: - - - - - - - - - - - - - - - - - - - - -
    ----------------------------------------------------------------------------------------
    ►Our Playlists on:-
    ►Competitive Programming : • How to start Competiti...
    ►C++ Full Course : • L-01 || Introduction a...
    ►Algorithms : • L-01 || Prefix Sum Arr...
    ►Data Structure : • Data Structures with C...
    ------------------------------------------------------------------------
    Our Students Contacts Form:-
    Form link: docs.google.co...
    ------------------------------------------------------------------------
    ► Jarico - Landscape: / la. .
    ► Jarico - Landscape [NCS BEST OF]: • Video
    ------------------------------------------------------------------------
    #interview_preparation #leeetcode #Hindi

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

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

    tbh ur content is very much underrated........................i stated watching ur videos today and believe me the confidence i have gained in unimmaginable cuz i am able to solve questions on codechef.
    ur way of explaining doesnt feel like any usual teacher, its unique
    ..........................

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

      You got this!.... Please please please ..If you like soo much ..then please share with all of your friends in every social media ...
      because i need support Today by YOU

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

    Today I completed all videos of Linked list and i clear all my basics of Linked list.Before watching this playlist I am afraid linkedlist but this playlist is tremendous ❤️❤️

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

    Bhaiya with in 10 days 41 videos ki playlist khatam kiya, aur sabhi questions kiya aapke saath. Bhot confidence aa gya hai linked list main. Thank you so much. Fir milta hu aapki kisi aur playlist mai comment karte hue.❤❤

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

    Way to explain a Code is very Nice . Bhaiya Keep Doing very beneficial for us.💥❣

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

      dil se aacha laga ye comment padhkar
      Please, share this channel in your college, groups, or LinkedIn bcoz it's cost nothing to you 😀

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

    Best way to explain a code. ❤️

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

    Sahi hai bhaiya Leetcode premium ka company wise video banate chalo agr premium questions companies wise nhi hai to mai aapko dedunga

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

    bhaiya literally bhot ache se smaj aa rha hai

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

    sir you are actually awesome....absolutely awesome......love the content you choose for making the videos
    sir plz competetive programming ka medium and hard level ki bhi videos bana do ....

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

    you are the best......masum.

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

    Bhai beech beech mein codechef long challenge ke hard question bhi samjha dya karo🙏🙏

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

    best channel so far sir!

  • @GudduKumar-fn8tb
    @GudduKumar-fn8tb ปีที่แล้ว +2

    today i have completed your whole linked list playlist
    and the confidence i have gained is unbeatable
    thanks bhaiya for creating such a best type of
    content on youtube..

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

    Best playlist I have seen

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

    awesome bhai.... nice way of explaining

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

    Done before watching the video!
    #include
    class Solution {
    public:
    int getDecimalValue(ListNode* head) {
    vector v;
    ListNode* temp = head;
    while(temp!=NULL){
    v.push_back(temp->val);
    temp = temp->next;
    }
    int ans =0;
    int j=0;
    for(int i=v.size()-1;i>=0;i--){
    ans = ans + v[i]*pow(2,j);
    j++;
    }
    return ans;
    }
    };

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

    Insted of string to int ,we can directly use the val and multiply It by every time.
    Just see below code.
    int sum = 0;

    while (head != NULL){
    sum *= 2;
    sum += head->val;
    head = head->next;
    }
    return sum;

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

      yess dude we can do this way

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

      @@HelloWorldbyprince thanks for the reply, I have just started watching your playlist hope I try to complete.

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

    Plz make vdo on DFS

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

    plz make playlist for service based companies

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

    I like this logic

  • @MOHITRANA-to7rf
    @MOHITRANA-to7rf 3 ปีที่แล้ว +1

    bhaiya why we cant use this this approach in linked list
    void display() {
    struct Node* ptr;
    ptr = head;
    int count;
    while (ptr != NULL) {
    int binary = 0, count =0;
    if (ptr->data == 1)
    {
    count+= 1**(binary);
    }

    // binary++;
    ptr = ptr->next;
    }
    cout

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

    This was asked in Nvidia’s first hackerrank screening interview

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

    first view

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

    Thanks Sirji

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

    Bhaiya doubt
    In function binary to decimal
    If s[i]==1
    Dec+=base
    base *=2
    Else
    Base*=2
    This is the correct code bhaiya
    For example 101 = 5
    For 1 base got multiply with 2 and dec get added
    But what about 0 else part the base should definitely multiply with 2 then we will get 5 answer otherwise get 3 wrong answer please reply if i correct or correct me ❤ resp+

  • @NikitaSinha-p5b
    @NikitaSinha-p5b 4 หลายเดือนก่อน

    I tried doing the same code on LeetCode, but it's showing memory limit exceeded. Can somebody please resolve this?

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

    hello sir,i am back do you rember me ....now i am going to start this video lecture series

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

      Yesssssss 😊
      Iss baar consistent rahna aache se

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

      @@HelloWorldbyprince yess sir...

  • @nigamGvlog
    @nigamGvlog 8 หลายเดือนก่อน

    My day 1 Problem solved 1

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

    sir where are you from???

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

    You stop fan because for viewers noise in audio

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

      sorry about it, i will make sure in further videos

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

    maine same code daala fir bhi wrong bta rha

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

      Leetcode kabhi kabhi dushmani nikalta hai relax 😁😁

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

      Just kidding, kuch na kuch to alag hoga yaar
      Either language selection or some syntax

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

      @@HelloWorldbyprince bhaiya plz plz placement series bnao or graph ,trie , dp , recursion , backtracting jaise topic bhi.....

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

    not a good approach
    ,it can be done using bitwise operator only in one iteration

  • @born2victory944
    @born2victory944 3 หลายเดือนก่อน

    first 5 min wasted successfully