Practice Questions of Community session!

Q1- What is a Data Structure?

a data structure is a way of organizing and storing data in a computer so that it can be accessed and manipulated efficiently

1 Like

DATA STRUCTURE is a set of arrangement of data…which enables to access program in efficient time,…two types: linear — array,linked list,stack,queueand non linear data structure—tree&graph

1 Like

Data structure is the way to arrange data in main memory(RAM) in efficient mannner

1 Like

it is way of storing and organizing data.

1 Like

It is a way to organize data that enables it to be processed in an efficient time

1 Like

Q2- What is LIFO explain it by giving real life examples!!

lifo - last in first out

1 Like

arrange plate in our kitchen(first in last out)

1 Like

lifo is LAST IN AND FIRST OUT…example:stack of books and piles of plates…we can peek on first book and remove the top most element which is added last

1 Like

LIFO -LASTIN FIRST OUT done in stack ex :- set of books

1 Like

example dishes ,
we stack dishes on top of each other and take the last one first

1 Like

Q3- What’s the difference between Stack and Array ??

STACK is a arrangement of data in upper sequential order…we cannot traverse in between or remove the random or specific elements…but array is a set of elements which can be traverse all through and any function can happen like remove push at any position

1 Like
  • Array: An array is a collection of elements of the same data type arranged in contiguous memory locations, where each element can be accessed using its index.
  • Stack: A stack is a linear data structure that follows the Last-In-First-Out (LIFO) principle, where the last element added to the stack is the first one to be removed
1 Like

array is a type of linear data structure it organaize data in a sequential form

wherease stacks stores data in a non linear method.

1 Like

Hi sorry students unfortunately due to some reasons our session ended so will connect tomorrow no issues if have some issues regarding that you can just let me know here in this thread!!

1 Like