Home » Creation of Stack in DS | Data Structures Tutorial | Mr. Srinivas naresh i technology c language

Creation of Stack in DS | Data Structures Tutorial | Mr. Srinivas naresh i technology c language

by myyachtguardian123



Creation of Stack in DS | Data Structures Tutorial | Mr. Srinivas

** For Online Training Registration: ► Call: +91-8179191999

💡 Also Watch

C Language Tutorials:
Core Java FAQ’s:
Core Java Tutorials:
Java Programming Tutorials by Mr.Hari krishna:

Advanced Java Programming Tutorials by Mr.Nataraj:

Subscribe to our channel and hit the bell 🔔🔔🔔 icon to get video updates.

💡 Visit Our Websites
For Classroom Training:
For Online Training:

#DataStructures #Training #Course #Tutorials
————————–

💡 About NareshIT:

“Naresh IT is having 14+ years of experience in software training industry and the best Software Training Institute for online training, classroom training, weekend training, corporate training of Hadoop, Salesforce, AWS, DevOps, Spark, Data Science, Python, Tableau, RPA , Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in USA, Hyderabad, Chennai and Vijayawada, Bangalore India which provides online training across all the locations

————————–

💡 Our Online Training Features:
🎈 Training with Real-Time Experts
🎈 Industry Specific Scenario’s
🎈 Flexible Timings
🎈 Soft Copy of Material
🎈 Share Videos of each and every session.

————————–

💡 Please write back to us at

📧 us.training@nareshit.com/ 📧 online@nareshit.com or Call us at the USA: ☎+1404-232-9879 or India: ☎ +918179191999 .

Images related to the topic naresh i technology c language

Creation of Stack in DS | Data Structures Tutorial | Mr. Srinivas

Creation of Stack in DS | Data Structures Tutorial | Mr. Srinivas

Search related to the topic Creation of Stack in DS | Data Structures Tutorial | Mr. Srinivas

#Creation #Stack #Data #Structures #Tutorial #Srinivas
Creation of Stack in DS | Data Structures Tutorial | Mr. Srinivas
naresh i technology c language
See all the latest ways to make money online: See more here
See all the latest ways to make money online: See more here

You may also like

32 comments

Naresh i Technologies 15/09/2021 - 12:54 Sáng

Please Comment, Subscribe and Click Bell🔔🔔🔔 Icon for More Updates. To learn software course from our experts please register here for online training: https://goo.gl/HIB0wL

Reply
CE13_Piyush Prajapati 15/09/2021 - 12:54 Sáng

Finally sir I got best explanation of stack sir my all douts are clear sir related to how to implement of stack 👍

Reply
14 Arka Das 15/09/2021 - 12:54 Sáng

BEST

Reply
study hacks 15/09/2021 - 12:54 Sáng

why main() function isn't called

Reply
BALVEER KUMAR JANPAL 15/09/2021 - 12:54 Sáng

27:52 most important note

Reply
raghava b 15/09/2021 - 12:54 Sáng

Thank you for the lecture..great work

Reply
BiG Ķ 15/09/2021 - 12:54 Sáng

thank you so much sir for this great explanation literally you cleared every question. thank you so much..

Reply
Sandesh Adhikari 15/09/2021 - 12:54 Sáng

Continue the DSA series please

Reply
NIRBHAY GARG 15/09/2021 - 12:54 Sáng

this is what we callled point to be noted

Reply
Kavya Budige 15/09/2021 - 12:54 Sáng

Thank you so much sir 🤗and please make a video on quick sort in data structures plz sir

Reply
Irfan Basha 15/09/2021 - 12:54 Sáng

Sir kindly, we can delete or erase the data by using the function called free(top)..

Reply
KING 15/09/2021 - 12:54 Sáng

Sir in pop,
if (isEmpty())
{
printf("Stack is Empty) ;

Should have been there, right?

Reply
helloworld 15/09/2021 - 12:54 Sáng

Concepts clear!!!

Reply
Brihaspati Angiras 15/09/2021 - 12:54 Sáng

thank you sir for helping

Reply
bhargav nadipineni 15/09/2021 - 12:54 Sáng

Sir, in pop function , we have to return the "ele" na because ele is the top element and "top" is index

Reply
Amey Bhojane 15/09/2021 - 12:54 Sáng

sir u r saying pop will return top element but in your function u r returning top value not element

Reply
Junaid Rashid 15/09/2021 - 12:54 Sáng

God bless u sir

Reply
Highway Group 15/09/2021 - 12:54 Sáng

While traversing, should the function return elements in LIFO order (as this is a stack) or FIFO order? Here FIFO is shown but LIFO is a better fit right?

Reply
Sandeep mishra 15/09/2021 - 12:54 Sáng

What a explanation. Very simple and in deep.

Reply
InDiA nA jOnEs 15/09/2021 - 12:54 Sáng

Sir I cannot thank you enough, would love to meet you sometime.

Reply
поджолес 15/09/2021 - 12:54 Sáng

superb C master class worth every second.

Reply
Tamilmaran C 15/09/2021 - 12:54 Sáng

excellent sir

Reply
Himanshu Joshi 15/09/2021 - 12:54 Sáng

sir is -1 integer or float ???

Reply
Bimal Murali 15/09/2021 - 12:54 Sáng

You are absolutely great sir.

Reply
Manoj Kumar Nagudala 15/09/2021 - 12:54 Sáng

At 24:41 we are returning top and when top=0 ( or if the element itself is 0(zero), and we are returning that element). Then in that case too there will a problem in the main function which thinks that the stack is empty.

Reply
Aswin G 15/09/2021 - 12:54 Sáng

I have been trying to understand stack for 3 years but failed.
Now I know the concept because of you.
Thank you very much

Reply
Maria Asad 15/09/2021 - 12:54 Sáng

what will the creation in c++ language?

Reply
DEEKSHANT GOYAL 15/09/2021 - 12:54 Sáng

Here is the complete code for the whole video:
#include <stdio.h>

#define CAPACITY 8

int stack[CAPACITY];

int top = -1;

int isempty() {

if(top == -1)

return 1;

else

return 0;

}

int isfull() {

if(top == CAPACITY-1)

return 1;

else

return 0;

}

int peek() {

return stack[top];

}

int pop() {

int ele;

if(!isempty()) {

ele = stack[top];

top = top – 1;

return ele;

} else {

printf("Could not retrieve data, Stack is empty.n");

}

}

int push(int ele) {

if(!isfull()) {

top = top + 1;

stack[top] = ele;

} else {

printf("Could not insert data, Stack is full.n");

}

}

int main() {

// push items on to the stack

push(10);

push(9);

push(8);

push(7);

push(6);

push(5);

printf("Element at top of the stack: %dn" ,peek());

printf("Elements: n");

// print stack data

int i;

for(i=0;i<=top;i++)

printf("%dn",stack[i]);

return 0;}

Reply
DEEKSHANT GOYAL 15/09/2021 - 12:54 Sáng

HERE IS THE COMPLETE CODE FOR PUSH OPERATION:
#include<stdio.h>

#define CAPACITY 8

int stack[CAPACITY];

int top=-1;

int isfull()

{

if(top==CAPACITY-1)

return 1;

else

return 0;

}

int push(int ele)

{

if(isfull())

{

printf("stack is full n");

}

else

{

top=top+1;

stack[top]=ele;

printf("elements are: %dn",ele);

}

}

int main()

{

push(10);

push(9);

push(8);

push(7);

push(6);

push(5);

push(4);

push(3);

push(2);

push(1);

return 0;

}

Reply
Vamshi Nenavath 15/09/2021 - 12:54 Sáng

It returns ele not top

Reply
SURAJ DANGI 15/09/2021 - 12:54 Sáng

sir you are a great teacher.

Reply
Mayur B 15/09/2021 - 12:54 Sáng

One of the best technical trainers I have ever listened to!!

Reply

Leave a Comment