Implementing Queue Using Linked List in C Language (With Code)

preview_player
Показать описание
Queue Using Linked List: This video will teach you about implementing queue using linked list. Queue using linked list can be implemented using a front and a rear pointer. This data structures and algorithms video is a part of my full course.

Best Hindi Videos For Learning Programming:

►C Language Complete Course In Hindi -

►JavaScript Complete Course In Hindi -

►Django Complete Course In Hindi -

Follow Me On Social Media
Рекомендации по теме
Комментарии
Автор

Data structures and algorithms playlist access kar lena:
Hope you are enjoying the course 🙏🏻🙏🏻

CodeWithHarry
Автор

bhai hope you remember me....i came back to your channel after many i want to remind you that I told you One Day this channels subscriber wud be said 1M is toooo big, but now see very soon this channel is going to achieve that...congratulations

thestranger
Автор

Sir ek request hai aapse, aap Computer system architecture ke upar full course ke video banao na me wait karunga, bohot benefit hota.

amritmoydas
Автор

Pro tip
use pointer to pointer Nodes in functions enqueue(struct Node **f, struct Node **r, int val) and dequeue(struct Node **f) ; so that pointers you move inside function actually reflect changes in driver code

aryan_
Автор

why this video has so much dislikes..shame on u those who are disliking this great content vedios ..if u cant do like then plz dont do dislike also...

sakshipadamwar
Автор

Plz plz plz complete the syllabus of data structures and algorithm.
I have completed your python, git, web development complete playlist.
I need ds and algo for my clg syllabus.
Plz complete the syllabus.
Humble request

aryangupta
Автор

Sir you really deserve 1 billion subscribers
I know you work so hard to put multiple vidoes daily.
You are the God of Coding.
Because you know everything from a-z.
There is a playlist on almost everything.
Hats off to you Sir🙏🙏

surendrashetty
Автор

Truly speaking
Sir i have never seen anybody work this hard for free for future programmers.

Hats off to u Sir

savagebear
Автор

Thanks harry bhai for this vedios please don't stop at binary search tree

bulukivine
Автор

Mind Blowing Class, Thank you for the tutorial <3

Queue implementation using Classes:
#include<bits/stdc++.h>
using namespace std;

class Node{//Created a Class Node same as Struct;
public:
int data;
Node* next;
};
Node *f; // Global uses and avoid return type;
Node *r;

class Queue{ // specified class for Queue for code reuse;
public:
void Enqueue(int val);
void Dequeue();
void Display(Node* ptr);
};
int main(){
Queue q;
//Enqueue;
q.Enqueue(20);
q.Enqueue(30);
q.Enqueue(40);
q.Display(f);
//Dequeue;
q.Dequeue();
q.Dequeue();
q.Display(f);
return 0;
}

void Queue::Enqueue(int val){
Node* n = (class Node*)malloc(sizeof(class Node));
if( n == NULL) cout<<"Queue Is Full.\n";
else{
n->data = val;
n->next = NULL;
if(f == NULL) f = r = n;
else{
r->next = n;
r = n;
}
cout<<val<<" new Node has been added.\n";
}
}

void Queue::Display(Node* ptr){
cout<<"Total Queue is : ";
while(ptr != NULL){
cout<<" "<<ptr->data;
ptr = ptr->next;
}
}

void Queue::Dequeue(){
if(f == NULL) cout<<"Queue is Empty.\n";
else{
int val = -1;
Node *ptr = f;
f = f->next;
val = ptr->data;
free(ptr);
cout<<"\n"<<val<<" has been Removed.\n";
}
}

pranx
Автор

Why these much dislikes for this video.??

arandomcomment
Автор

Thanks for the video Harry
Guys like this video to appreciate him

ayushgupta
Автор

bhai sab samaj aa gaya acche se...thanks harry bhai

brahamaggarwal
Автор

Next video sir upload karo harry bhai..😁🔥

TrickstarKeshu
Автор

Thank you so much Harry bhai for such great Course 🙏🙏🙏

DipsOfficial
Автор

I have a question regarding python. Can I open any file, folder, apps without adding a path?

suvanjanprasai
Автор

Thanks after thanks after thanks.. you’re indeed the best teacher :)

Faceless-Tomato
Автор

Man i was having such a hard time with this literally cried after understanding this code idk why was so confused now i realised its bcoz of the bad sources.-

commonsense
Автор

Sir plz start one project on c will helpful in our resume(interview)🙏

babukudal
Автор

Please try to make more videos
.And thanks for making these awesome videos 😄😄😄😄😄

vaibhavgupta