Unnamed: 0 int64 1 5.86k | Question stringclasses 24
values | Sample ANS stringclasses 24
values | Student ANS stringlengths 1 1.06k | Score float64 0 2.5 |
|---|---|---|---|---|
2,035 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks are last in first out based .\nthey can be understood as a pile of books \nthey are real life possible thing.\nwhen constrains of lifo are applied in a 1-D array it becomes a stack we use stack for organsing are data as examle:the recent incident is ought to be searched more in google this way we can store the d... | 2.5 |
2,036 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | A Stack can be used for evaluating expressions consisting of operands and operators. Stacks can also be used for Backtracking. | 2.5 |
2,037 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks works on last in last out which can be used graph traversal , prefix suffixes etc. | 1.5 |
2,038 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack is a LIFO data structure that is last in first out.We use stack to keep track of memory and space used in a program so that when a stack overflows is gives us an error. | 2.5 |
2,039 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stack uses last in first out technique so we use it when we need to access most recently entered data first | 1 |
2,040 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks is a LIFO (last in first out) data structure in which it returns the last value stored in the stack when we pop out the top value and returns -1 if the stack is full. | 2.5 |
2,041 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stack is used for backtracking. | 1 |
2,042 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack can be used for backtracking. | 1 |
2,043 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | we use stacks when Last In First Out method is used. | 2.5 |
2,044 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack implements Last In First Out(LIFO). Whenever we need this situation we use stacks. | 2.5 |
2,045 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks are the data structure that performs operation in FILO, we majorly use stacks to use this operation. | 1 |
2,046 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stack for the use of first come last out approach. | 1 |
2,047 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | it is a efficient data structure that has a property of last in first out (LIFO) this property helps to perform certain action easily that why we use stacks | 2.5 |
2,048 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack is a data structure that follows the LIFO (Last In First Out Rule). A stack can be implemented using an array or a linked list. Stacks have different applications. \n1. It is used in Depth First Search (DFS) traversal of a tree.\n2. Recursive functions can be used to convert into iterative using stacks. | 2.5 |
2,049 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks are used to carry out and evaluating the operations and operands | 1 |
2,050 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack is a data structure that stores the data according to FIFO (First In First Out) principle i.e. the data can be accessed through one way only. The data item that was stored at last will be accessed first. It is very useful while performing various searches. | 2 |
2,051 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stack so that we get the information about memory or space like when we get stack overflow | 2.5 |
2,052 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stacks because it is a linear data structure and is of the type last in last out. If we want to quickly store a value which needs to be accessed immediately afterwards (and discarded) we can use it. It is especially useful in divide and conquer strategy of algorithm solving. | 2.5 |
2,053 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks works on LAST IN FIRST OUT, the element that has put in the last we have to access it first\nlike in case of DFS traversal of graphs. | 2 |
2,054 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack is a data Structure in which we can say our data is stored in stack ,(pilled up)\nIt is LIFO type Data Structure(Last in First Out)\n| 6 |\n| 5 | --> illustration of Stack\n|___4_ _ |\nit is used when we need to excess data which we entered latest. | 1 |
2,055 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | when we are told to solve a question which demands first in first out approach or required to pop or put data in top to down manner then we use stacks. | 2 |
2,056 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | A stack can be used for evaluating expressions consisting operands and operators. It can be used for backtracking. It can be used to convert one form to other form. | 2 |
2,057 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | so that we can remove first inserted element at last. as it works on last in first out principal last inserted element will be removed at first. | 2 |
2,058 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | A Stack can be used for evaluating expressions consisting of operands and operators. Stacks can be used for Backtracking, i.e., to check parenthesis matching in an expression | 1 |
2,059 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks is based upon first in first out principle or FIFO. The data that you are inserting in stack would be pushed out first after that the second, the third and so on. | 1 |
2,060 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack is a type of data structure to store the data. It works on the principle of first in first out. So if we need to store data and then retrieve it in opposite order of the values places then we should use stack data structure. | 1 |
2,061 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks are used when we want to use the last in first out principle as stacks works on LIFO. | 1 |
2,062 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack uses LIFO approach (Last in first out) that means we can stack our data and the recent data is called first. Stack has some major applications in the understanding of recursion. | 1 |
2,063 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks works on the principle of LIFO: Last in First out. This approach of retrieving the data and using it for it other purpose is useful in many problems and helps to reduce the steps of our solution. The stack module of STL library has predefined functions which reduce the effort of writing the most used pieces of c... | 1 |
2,064 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | it is data structure works on last in first out basis.\nwe use it for\n1 expression evaluation-for evaluating arithmetic operations\n2undo/redo functions\n3.for backtracking and recursion | 2 |
2,065 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks follow the Last in, First out procedure. So they are basically used to maintain the record whenever we need to fill a dataset and use these properties. | 1 |
2,066 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Merge sort, N queens problems, Closest pair problem | 1 |
2,067 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stacks wherever Last in First out property is required.\nFor example in parenethesis matching problem, stacks are used to store opening parenthesis until closing arrives. | 2 |
2,068 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks are used to arrange data in first in last out fashion. | 1 |
2,069 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Whenever we need to access the data entered at last in a data structure first of all | 1 |
2,070 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Merge sort | 1 |
2,071 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks are data structures that are based on the principle of Last In First Out (LIFO). We use stack to implement techniques such as recursion, some other examples are : Tower of Hanoi , Reversing Linked Lists etc. | 1 |
2,072 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | we use stacks rather than array to use elements in a specific order | 2 |
2,073 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks are like a block in which we can push our elements. Then, we can find the top most element, pop out top element etc. It's time complexity depends on the operation but space complexity is O(n) as we are taking memory. Stacks can be helpful in questions like we have to find a count of a number, to check duplicate ... | 1 |
2,074 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks work on the principle of LIFO (last in first out). Stacks can be used to record the track of elements stored. | 1 |
2,075 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | we use stacks to do the questions or algorithms in which we have to push the first element as pop it at last. as stack is filled bottom to top .\nLast in First out property | 1 |
2,076 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stacks when we need to perform the LIFO (Last In First Out) operation in a particular problem. | 1 |
2,077 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | it used in the cases for which we want the operation \ | 1 |
2,078 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack is a linear data structure that follows LIFO method to perform all the operations. | 1 |
2,079 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks are used to store data that are in order. They work on the principle of LIFO ( Last in First Out ). So , elements are stored when an array or any data structure is traversed and the last element traversed is stored on the top and can be retrieved first. This helps in accessing the recent or last data being store... | 1 |
2,080 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stack is a data structure which the principle of LIFO (Last in First out). which can be seen in many places in daily lives like stack of a plate. sometimes this technique is used to solve various problem like like problem in which 3 rods are given and we have to move the discs from one rod to another and arrange them i... | 1 |
2,081 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks are used to keep the record of the element .It follow the LIFO approach last come first out which mean the last element which inserted in stacks will come out first. | 1 |
2,082 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks are used for their FILO (First In Last Out) or LIFO (Last In First Out) properties. | 2 |
2,083 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Merge Sort and problems such as shortest distance on 2D graph are the examples of divide and conquer algorithms.\n | 2 |
2,084 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks used LIFO (last in first out ) approach , we use stacks for comparison of words, string , for example we use stack in string matching algorithm . | 2 |
2,085 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | they are data structures used for storing data mostly in the form of first in last out order. \nyou can push and pop data nodes according to youyr requirements.\n | 2 |
2,086 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | it is the faster, it is the use very easy | 2 |
2,087 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | we use stack for easy pushing and popping of an element the working of an stack is like a element is pushed at the end of the stack and one element popped from the top that we need | 2 |
2,088 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stack to solve problems where the data moves in a firs-in-first-out manner i.e. the data we push or insert in the stack last should pop or get removed first. | 1 |
2,089 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks are the data structure in which uses the principle of last-in-first out (LIFO) .it uses the push function (to insert the element) and pop function. | 1 |
2,090 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | we use stacks as it uses to implement LIFO technique last in first out technique and it can be very useful to solve mathmatical equations ina very efficient ways | 2 |
2,091 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks are used to solve problems like undo text, | 1 |
2,092 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | depth first search uses stack data structure in its execution | 1 |
2,093 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks work on the principle of last in first out(LIFO),thus are useful when we want to remove elements in a this manner. | 1 |
2,094 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | for last in first out kind of operations | 1 |
2,095 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stack is used to implement last in first out ( LIFO) . the element we enter | 1 |
2,096 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stacks in the cases where we need to get the data from only one direction. It works on the principle of LIFO so in any case where we want to store the data in a linear data structure and we only need to get or access the element that was last inserted in in we use Stacks. It is very commonly used in search algor... | 2 |
2,097 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks are LIFO (Last In First Out) operators. Stack are used in balanced parenthesis problems where we have to check if the opening parenthesis are balanced by the number of closing parenthesis. | 2 |
2,098 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack is a linear data structure which follows the LIFO principle which says that last in first out and in many problems we need LIFO principle and we easily solve those problems by using stack. | 2 |
2,099 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | when we have problem where we have to implement last in first out | 2 |
2,100 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks are used in order to store data such that only 1 field is required at that time. As the name suggests, its just like stack of blocks we can say storing the data.\nTo take an example in order to make it more clear we use stacks in undo and redo operations. like in undo it gives what was the last step done. | 2 |
2,101 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks are used to arrange the function calls in any problem, where we use the concept of last in first out, that is it for example there is a function which is has a function call of a print function within so it stops the execution right away and puts the print function on top now and solves it first and then goes ba... | 1 |
2,102 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stacks as it eases the process of algorithm as the elements get arranged like stacks. | 1 |
2,103 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks basically follows the principle of LIFO that is last in first out. And at many places we want this principle and hence we use stack there. Example where we use stack is depth first search. | 1 |
2,104 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks work on the principle of LIFO that is Last In First Out. So whenever we deal with a problem where we need to deal with the current element first we would use stack. | 1 |
2,105 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks follows first in last out property. so where we need to perform an operation where this type of operation is needed we use a stack.\n | 1 |
2,106 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack are the data structure use to store the element in such a way that the element which will come in Last, will get out firstly.\nIt obeys LIFO property and hence whenever we need it we use it.\nSome examples of use of stack are Depth First Search, For doing preorder or inorder traversal iteratively without using in... | 1 |
2,107 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | in stacks as we use LIFO last in first out therefore it helps in problems where we need the data we entered last before others. | 1 |
2,108 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stacks in cases when we need to insert the data from front and also take it(pop) from front. For instance in a library book management system we can use stacks for storing the data regarding the books. | 1 |
2,109 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | we use stacks to store the elements , then we can pop ,push the element , find the topmost element, etc. | 1 |
2,110 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks uses the LIFO technique to form a linear data structure. | 1 |
2,111 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stacks to store data in the \ | 1 |
2,112 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack is used when we require a linear data structure which follows LIFO technique. it is very useful when we need to apply recursion in program. | 1 |
2,113 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks are used for finding the particular order in whcih actions are perfomed. | 1 |
2,114 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack is based in Last In First Out property. These are at the basic level arrays only and can be implemented from the same. These are useful for performing quick operations like push, pop and where we need to remember the last element at which we were as it makes accessing the last element easier than in an array. | 1 |
2,115 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack follows FILO - First In Last Out rule. | 1 |
2,116 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks are used first in first out problems. the data enter first is pop out first | 1 |
2,117 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | because it follows LIFO rule. | 1 |
2,118 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks are used to solve the problem where the data moves in FirstIN LastOUT manner | 1 |
2,119 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stacks to store the data with last in first out system.it is used as a container to store the data items. | 1 |
2,121 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stack because:\na)to organize the data (large data)\nb)to provide the best time complexity\nc)to make our question easier | 1 |
2,122 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stacks to store the data in form of LIFO i.e Last in first out | 1 |
2,123 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | we use stacks because of the feasibility of use and we also use it for back tracking.\nit also helps in converting one form of equation to another from.\n\n | 1 |
2,124 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks can be used mainly for backtracking. It can also be used for convert one expressions to another expressions. | 1 |
2,125 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stack is basically used for last in first out scenarios. It can be used in backtracking for eg. to check parenthesis matching in an expression | 1 |
2,126 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | we use stack to solve the algorithmic problems that require LIFO (Last in first out) data structures | 1 |
2,127 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks use LIFO operation which means Last data in will be displayed first. It can be used in DFS tree traversal. | 1 |
2,128 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | We use stack for applications that need first in last out type applications. It is a data structure that stores data in such a way that data entered last leaves first. It is also used to remove recursion.\n | 1 |
2,129 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack data structure follows the principle where the first input is will be output last . It is used where we need to store the previous information but the operation we are asked to perform on the last entered input . LIKE STACK DATA STRUCUTURE IS USED IN DFS TRAVERSAL OF GRAPH . | 1 |
2,130 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stack is used to store data in first in last out manner. | 1 |
2,131 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stack are lifo operation which means the data we entered at last will come out at first. | 1 |
2,132 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stack is a data structure which has property of last in first out (LIFO), so we can access only top element. It is widely used in recursive approaches such as devide and conquer algos as it stores all the recursive calls made. It is also used in evaluating prefix and postfix notations. | 1 |
2,133 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | Stacks are needed to insert and pop the data which it does in constant time complexity. It follows the LIFO(last in first out) fashion.\nInsertion and deletion of the data is very simple in stacks. There are various other operations that a user can perform by using stacks. | 2 |
2,134 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stack used when we want to follow the order of LIFO. last in first out element arrive in last will remove at first. | 2 |
2,135 | Why do we use stacks? | Stacks follows LIFO method and addition and retrieval of a data item takes only Ο(n) time. Stacks are used where we need to access data in the reverse order or their arrival. Stacks are used commonly in recursive function calls, expression parsing, depth first traversal of graphs etc. | stacks work on last in first out basis. We use stack or queue instead of arrays/lists when we want the elements in a specific order i.e. in the order we put them (queue) or in the reverse order (stack). \nstacks are dynamic while arrays are static. So when we require dynamic memory we use queue or stack over arrays | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.