About 448,000 results
Open links in new tab
  1. What is Stack Data Structure? A Complete Tutorial

    Mar 6, 2025 · Stack is a linear data structure that follows LIFO (Last In First Out) Principle, the last element inserted is the first to be popped out. It means both insertion and deletion operations happen at one end only. Here are some real world examples of LIFO. Consider a stack of plates. When we add a plate, we add at the top.

  2. Stack Algorithm in Data Structures - Online Tutorials Library

    Stack Algorithm in Data Structures - Learn about the Stack Algorithm in Data Structures, including its working principles, operations, and applications. Explore examples and implementation details.

  3. Stack Data Structure and Implementation in Python, Java and …

    A stack is a useful data structure in programming. It is just like a pile of plates kept on top of each other. In this tutorial, you will understand the working of Stack and it's implementations in Python, Java, C, and C++.

  4. Implement a Stack in C Programming - GeeksforGeeks

    Nov 13, 2024 · Stacks are widely used in programming for tasks like expression evaluation, function call management, and backtracking algorithms. In this article, we will learn how to implement a stack in the C programming language.

  5. Stack Data Structure - GeeksforGeeks

    Mar 27, 2025 · What is Stack Data Structure? A Complete Tutorial. A Stack is a linear data structure that follows a particular order in which the operations are performed. The order may be LIFO (Last In First Out) or FILO (First In Last Out).

  6. DSA Stacks - W3Schools

    Experiment with these basic operations in the stack animation above. Stacks can be implemented by using arrays or linked lists. Stacks can be used to implement undo mechanisms, to revert to previous states, to create algorithms for depth-first search in graphs, or for backtracking.

  7. Push and Pop Operation in Stack: Algorithm and Program

    Apr 5, 2021 · PUSH operation of the stack is used to add an item to a stack at the top. We can perform Push operation only at the top of the stack. However, before inserting an item in the stack we must check stack should have some empty space. Step 1 …

  8. Intro to Stacks – Data Structure and Algorithm Tutorial

    Mar 19, 2024 · This section covers the internal workings of stacks, showcasing how to implement a stack in Java using arrays or linked lists. You'll explore advanced stack operations and delve into practical use cases, such as undo mechanisms in text editors, parsing expressions, and backtracking algorithms.

  9. Stack Tutorial, Algorithm, Programs - Data Structure Tutorial …

    Algorithm to push an item into stack. 1) IF TOP = MAX then. Print “Stack is full”; Exit; 2) Otherwise. TOP: = TOP + 1; /*increment TOP*/ STACK (TOP):= ITEM; 3) End of IF. 4) Exit. Pop operation is used to remove an item from stack, first get the element and then decrease TOP pointer. Algorithm to pop an element from stack.

  10. Python Stack Data Structure: When and Why to Use it

    Apr 17, 2025 · Let’s also look at an example from everyday computing – the undo button. When you use a text editor or drawing app, every action you take is recorded in order. ... DFS algorithms use stacks to remember which node to visit next. Each time a new node is reached, it’s pushed to the stack. Backtracking happens when popping from the stack and ...

  11. Some results have been removed
Refresh