Code to Create a Linked List in C | Programming

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ต.ค. 2024
  • Code to Create a Linked LIst in C programming video. Very detail code with an easy explanation.
    Video Link for theory :- • Code to create a Linke...
    Github Link :- github.com/viv...

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

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

    i nearly wasted half-day by listening other lecture videos(linked list) and learned nothing ,confused alot, but after listening to your lecture i got full clarity on linked list.thank you sir

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

    Very easy explanation for absolute beginners. I wasted my whole day learning linked list from others videos but learned nothing and got confused. You clarified everything so easily . Thank you sir.

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

    Informative. Instead of assuming we know all the basics, you explained functions of each code NICEEE! Keep up the good work.

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

    Ab jakr koi video mili jism linked list k hr point ko describe krk btaya ....thank you so much sir

  • @Irshadkhan-ht7yj
    @Irshadkhan-ht7yj 4 ปีที่แล้ว

    sir i am from Pakistan this video lecture helps me a lot in data structure so it is humbly requested to give such type of lecture on each data structure instead of only explaining algorithm codes explanation helps the students a lot.
    thank you sir for this lecture and uploading its program.

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

    Sir,you are truly mind-blowing
    Earlier I used to see mycodeschool videos but they have stopped uploading a long time ago... You are a the best sir

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

      The founder of mycodeschool is no more in the world :( He met with an accident. Hence no videos.

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

      @@patil88ganesh how did u find that out??

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

    Can you turn this into a series? Maybe you could do doubly linked list next and move onto more and more complex data structures you cover in the other videos

  • @worldoffootball185
    @worldoffootball185 11 หลายเดือนก่อน

    very good teaching sir no one can explain this topic in the youtube

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

    Nice and relaxed, easy does it teaching. As good as it gets, many thanks!

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

    Clear explanation with good information tq 👍 sir .......

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

    Sir plz do the coding for all topics in data structures

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

    great explanation sir....thank u very much💯

  • @holyshit922
    @holyshit922 5 ปีที่แล้ว

    I think i finished your algorithm for merge sort linked list but i am not sure is it correct , it seems to be correct but i didnt test it correctly
    (You have find middle function - second head , and merge sorted linked list to form new sorted linked list
    I wrote splitBefore function because you had found second head In merge functon i set prev pointers and pointer tail node
    and i wrote recursive sorting function)
    I have also partition sort linked list but I think that code can be simplified
    I have tree sort linked list , worst case can be eliminated using red black tree or AVL tree
    Our linked list will be general if we use void* as data type, use variable number of function arguments, and pass function as parameter to other function fe for comparison

    • @holyshit922
      @holyshit922 5 ปีที่แล้ว

      ideone.com/srAlNc
      Linked List by Robert Lafore
      Merge Sort I (have) finished algorithm that Vivekanand Khyade described
      Partition Sort I decomposed it into parts and wrote each part Goodrich & Tamassia slides was helpful for partition step
      BST Sort I have found necessary functions on the internet
      Exercises for you
      Try to implement non recursive merge sort - natural merge sort is an option
      This Partition sort uses Lomuto partition which is applicable to both singly linked list and doubly linked list
      Try to write Partition sort with Hoare partition
      Time complexity for worst case of this BST sort is O(n^2) Try to improve worst case by using self-balancing BST

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

    Very easy explained. My doubts are cleared. Thank u sir

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

    simple and clear!!!

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

    Excellent video! Just one question, I don't fully understand why p = head after for loop. Anybody can help?

    • @Aakash-qr6ky
      @Aakash-qr6ky 2 ปีที่แล้ว

      Becoz we have to print values of data from starting , but before declarating p=head , p was pointing the null of q so that's why..

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

    Thank u sir for such a wonderful video

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

    this format is quite good sir. keep it up

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

    Spr sir ❤️ explanation is really awesome 😍

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

    yar what is this ..size of link list is fixed in your video....is it the link list???

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

    Love your videos. Can you create a video on Hash table and hash code?

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

    Very well explanation!

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

    Sir,plzz upload graph coloring using backtracking

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

    Very good

  • @rahulsinghai3033
    @rahulsinghai3033 5 ปีที่แล้ว

    Hello sir please explain flattening of linked list question if you find time

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

    Thankyou very much sirrr..🙏

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

    Write a c program to construct a linear link list in c to store student records .The record contains roll no and total Mark's. The program stops when a negative roll no is entered . How to do this pls hlp.

  • @ArifulIslam-im7wr
    @ArifulIslam-im7wr 3 ปีที่แล้ว +2

    Outstanding explanation ❤❤❤

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

    hi!
    if i want to add defence programming (a>0 && a

  • @nadiahossain7327
    @nadiahossain7327 5 ปีที่แล้ว

    Hello Sir, can you please do hasse diagram.

  • @sunilsaini-yb7lb
    @sunilsaini-yb7lb 5 ปีที่แล้ว

    U r always awesome ,plz keep uploading sir

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

    Very nice Sir

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

    ❌ sizeof() is an operator not a function

  • @NOPerative
    @NOPerative 5 ปีที่แล้ว

    Excellent video.

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

    best for linked list !

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

    Sir code gulo aktu vs code e run koriye dekiye din

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

    After for loop completes, why we have to write p=head in the code

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

      The p=head is used so that p point at the start of the list since we need to print list from start.
      Before that the p was not in the start. Hope that helps.

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

    ❤️

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

    Thank You

  • @iulia-andreeagrigore4110
    @iulia-andreeagrigore4110 3 ปีที่แล้ว

    I got Segmentation 11 when I run the program.

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

    Sir, can you write the same linked list program to get the output as Banana->orange->pineapple->mango->apple, as the output...when I try to do the same with the above strings I am getting segmentation error...please sir upload such program...it will be a great help

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

    please tell what is the name of the compiler

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

    Kindly find and back opertion implement if any one ve then share link plzz

  • @SarangaE-gv5hf
    @SarangaE-gv5hf 3 ปีที่แล้ว

    bloody damn explanation

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

    These teachers are in university,not those rude teachers

  • @Devil_queen_5.0
    @Devil_queen_5.0 6 หลายเดือนก่อน

    Thank you so much Sir

  • @sravankumar4750
    @sravankumar4750 5 ปีที่แล้ว

    hi sir.

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

    Sir -> ka meaning kya hota hai??

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

      its directive operator -> ka matlab aap Pointers use kar rahe aur kisi cheez ki taraf Point kar rahe hein ,
      Pointer use karte waqt is tarah access kiya jata he

    • @ARMINK6969
      @ARMINK6969 4 หลายเดือนก่อน

      ​@@yhz2K - minus hai kya

  • @vinaymishra9523
    @vinaymishra9523 5 ปีที่แล้ว

    hindi me kyu nhi explaination karta koi?

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

    G 33

  • @RekhaTripathi-u6j
    @RekhaTripathi-u6j 9 หลายเดือนก่อน

    👍👍👍👍👍🫡🫡🫡

  • @varshaa6675
    @varshaa6675 5 ปีที่แล้ว

    #include
    #include
    struct node{
    int data;
    struct node *next;
    };
    int main(void) {
    struct node *p,*temp,*head;
    int n;
    scanf("%d",&n);
    int element,i;
    scanf("%d",&element);
    temp=(struct node *)malloc(sizeof(struct node));
    temp->data=element;
    temp->next=NULL;
    head=temp;
    p=head;
    for(i=1;idata=element;
    temp->next=NULL;
    p->next=temp;
    p=p->next;
    }
    p=head;
    while(p!=NULL)
    printf("%d",p->data);
    return 0;
    }
    the same code u taught but i am getting infinite values i give could u help me to debug it

    • @sahanasshenoy8878
      @sahanasshenoy8878 5 ปีที่แล้ว

      Hey you have missed to create a node in forloop before allocating the element to the temp;
      Temp already pointing to first node and same node is altered.
      and at the end, you haven't iterated the link of your node in while() its stucked at first node only.

    • @sahanasshenoy8878
      @sahanasshenoy8878 5 ปีที่แล้ว

      #include
      #include
      struct node{
      int data;
      struct node *next;
      };
      int main(void) {
      struct node *p,*temp,*head;
      int n;
      scanf("%d",&n);
      int element,i;
      scanf("%d",&element);
      temp=(struct node *)malloc(sizeof(struct node));
      temp->data=element;
      temp->next=NULL;
      head=temp;
      p=head;
      for(i=1;idata=element;
      temp->next=NULL;
      p->next=temp;
      p=p->next;
      }
      p=head;
      while(p!=NULL){
      printf("%d\t",p->data);
      p = p->next;
      }
      return 0;
      }
      Compare this with your program if you got confused

    • @sahanasshenoy8878
      @sahanasshenoy8878 5 ปีที่แล้ว

      Dry run your program on paper step by step first. you will get to know. if not refer below.TRY FIRST IN ORDER TO UNDERSTAND WHAT YOU ARE DOING.

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

    mura kag amaw buanga ka