63 solutions available
Question 1Assertion (A): The major implementation of using a data structure is to manage the storage of data in the memory efficiently.Reasoning (R):...
Question 2Assertion (A): While working with Stacks, the program should check for Overflow condition before executing push operation and, similarly,...
Question 3Assertion (A): Stack is a memory structure that works on the principle of FIFO (First In, First Out).Reasoning (R): Stack is implemented...
Question 4Assertion (A): A Stack is a linear data structure that stores the elements in First In, First Out order.Reasoning (R): In Stack, a new...
Question 5Assertion (A): Stack and Queue are linear data structures.Reasoning (R): List, tuples and dictionaries are Python built-in linear data...
Question 6Assertion (A): An element in a Stack is removed from its Top.Reasoning (R): The process of removing an element from a Stack is called...
Question 7Assertion (A): An error gets displayed when you try to delete an element from an empty Stack.Reasoning (R): Inserting an element when the...
Question 1Data Structure means organization of data.
Question 2A data structure has well defined operations, behaviour and properties.
Question 3A stack is a linear list, also known as LIFO list.
Question 4A list is a mutable sequence of data elements indexed by their position.
Question 5Traversing means accessing or visiting or processing each element of any data structure.
Question 6push is the term coined for insertion of elements in a Stack list.
Question 7Consider the following operations done on Stack:push(5)push(8)pop()push(2)push(5)pop()pop()pop()push(1)pop()The output of the above snippet...
Question 8In the Stack, if a user tries to remove an element from the empty Stack, it is called underflow of stack.
Question 9If the elements "A", "B", "C" and "D" are placed in a queue and are deleted one at a time, the order in which they will be removed will be...
Question 10The process of inserting an element in a queue is called enqueue while deleting an element from a queue is called dequeue.
Question 1The process of inserting an element in Stack is called:CreatePushEvaluationPop
Question 2The process of removing an element from Stack is called:CreatePushEvaluationPop
Question 3In a Stack, if a user tries to remove an element from an empty Stack, the situation is called:UnderflowEmpty collectionOverflowGarbage...
Question 4Pushing an element into a Stack already having five elements and a Stack of size 5, then the Stack becomes:User flowCrashUnderflowOverflow
Question 5Entries in a Stack are "ordered". What is the meaning of this statement?A collection of Stacks can be sorted.Stack entries may be compared...
Question 6Which of the following applications may use a Stack?A parentheses balancing programTracking of local variables at run timeCompiler Syntax...
Question 7Consider the usual algorithm for determining whether a sequence of parentheses is balanced.The maximum number of parentheses that appear on...
Question 8A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is...
Question 9A Queue is a:FIFO (First In First Out) listLIFO (Last In First Out) listOrdered arrayLinear tree
Question 1What is Stack? Why is it called LIFO data structure?
Question 2List two ways to implement Stack.
Question 3Write applications of Stack.
Question 4Can a Stack be used to convert a decimal number into a binary number?
Question 5Write an algorithm to push an element into the Stack.
Question 6Write an algorithm to pop an element from the Stack.
Question 7Write an interactive menu-driven program implementing Stack using list. The list is storing numeric data.Solutiondef push(num): h =...
Question 8Write an interactive menu-driven program to implement Stack using list. The list contains the names of students.Solutiondef push(student):...
Question 9How does FIFO describe queue?
Question 10Write a menu-driven Python program using queue to implement movement of shuttlecock in its box.Solutionqueue = [] def display_queue():...
Question 11Give the necessary declaration of a list implemented Stack containing float type numbers. Also, write a user-defined function to pop a...
Question 12A linear Stack called Directory contains the following information as contacts:— Pin code of city— Name of cityWrite add(Directory) and...
Question 13Write add(Books) and delete(Books) methods in Python to add Books and Remove Books considering them to act as append() and pop()...
Question 14Write AddClient(Client) and DeleteClient(Client) methods in Python to add a new client and delete a client from a list client name,...
Question 15Write Addscore(Game) and Delscore(Game) methods in Python to add new Score in the list of score in a game and remove a score from a list...
Question 16Write a Python program to sort a Stack in ascending order without using an additional Stack.Solutiondef pushSorted(s, num): if len(s) ==...
Question 17A Stack STK and Queue QUE is being maintained. Their maximum size is the same:(i) check whether they have the same size, i.e., have the...
Question 18(i)Write an algorithm to insert element into Stack as a list.
Question 18(ii)Write an algorithm to insert element into Queue as a list.
Question 19Write a program to create a Stack for storing only odd numbers out of all the numbers entered by the user. Display the content of the...
Question 20Write a program that, depending upon the user's choice, either adds or removes an element from a Stack.Solutiondef add(stack): h =...
Question 21Write a program that, depending upon the user's choice, either pushes or pops an element in a Stack. The elements are shifted towards the...
Question 22Write a program to insert or delete an element from a Queue depending upon the user's choice. The elements are not shifted after insertion...
Question 23Two lists Lname and Lage contain name of person and age of person respectively. A list named Lnameage is empty. Write functions as per...
Question 24A dictionary stu contains rollno and marks of students. Two empty lists stack_roll and stack_mark will be used as Stack. Two functions...
Question 25Write AddCustomer(Customer) and DeleteCustomer(Customer) methods in Python to add a new Customer and delete a Customer from a List of...
Question 1Single-ended linear structure is a type of queue data structure.
Question 2Reversing a word/line is an application of Stack.
Question 3The insertion and deletion from a Stack takes place only from the 'TOP'.
Question 4A queue behaves on the basis of LIFO principle.
Question 5When a queue is implemented with the help of a list, it is termed as a linear queue.
Question 6Deletion of an element from the queue is termed as pop operation.
Question 7An element to a queue is added from the front end.
Question 8Handling the processes of a network printer is the most important application of queues.
Question 9The append() function inserts an element at the rear end in a queue.
Question 10Stack is a linear data structure.
Question 11PUSH operation may result in underflow condition.