About 587,000 results
Open links in new tab
  1. Implement Stack using Array - GeeksforGeeks

    Mar 21, 2025 · To implement a stack using an array, initialize an array and treat its end as the stack’s top. Implement push (add to end), pop (remove from end), and peek (check end) operations, handling cases for an empty or full stack. Step-by-step approach: Initialize an array to represent the stack. Use the end of the array to represent the top of the stack.

  2. Algorithm and Flowchart for Stack using Arrays - ATechDaily

    Mar 2, 2021 · Algorithm for PEEK() operation in Stack using Arrays: Step 1: Start Step 2: Declare Stack[MAX] Step 3: Push the elements into the stack Step 4: Print the value stored in the stack pointed by top.

  3. Array Implementation - Tpoint Tech - Java

    Aug 28, 2024 · In array implementation, the stack is formed by using the array. All the operations regarding the stack are performed using arrays. Lets see how each operation can be implemented on the stack using array data structure. Adding an element into the top of the stack is referred to as push operation. Push operation involves following two steps.

  4. Stack Implementation Using Array in C - W3Schools

    This tutorial will implement a basic stack in C using an array. We will cover the two primary operations performed on a stack: pushing an element (adding to the stack) and popping an element (removing from the stack).

  5. How to Implement Stack Using Array? (C, C++, Java, Python)

    Feb 20, 2025 · Implementation of stack using array is a fundamental skill in computer science. A stack operates on a last-in, first-out (LIFO) principle. Here, we will guide you through the steps to implement stack operations like push, pop, and peek using an array, with clear examples. What is …

  6. Data Structures Tutorials - Stack Using Array with an example …

    Just define a one dimensional array of specific size and insert or delete the values into that array by using LIFO principle with the help of a variable called 'top'. Initially, the top is set to -1. Whenever we want to insert a value into the stack, increment the top value by one and then insert.

  7. Implementation Of Stack using Array

    Jan 25, 2023 · In this article, we will learn what is a stack, the algorithm for the implementation of stack using array, the algorithm of the stack with an example dry-run, the program for the implementation of stack using array, and the applications of stack.

  8. Stack Implementation Using Array. - AlgoLesson

    Jan 6, 2024 · Implementing a stack using an array involves using a fixed-size array to store elements and managing the stack operations by manipulating the array's indices. In this article, we will discuss stack implementation using an array and the advantages and disadvantages of using an array for this implementation. Stack Implementation using Array.

  9. Write an algorithm for push and pop operation in stack using array ...

    Mar 28, 2020 · Consider you have an array of some random size. You need to perform dequeue operation. You can perform it using stack operation (push and pop) or usin

  10. Array Implementation of Stacks | Baeldung on Computer Science

    Mar 18, 2024 · There are several possible implementations of the stack data structure, based on fixed-size arrays, dynamic arrays, and linked lists. In this tutorial, we’ll implement the stack using the fixed-size array representation. 2. Fixed-size Array Representation. In this representation, the stack effectively consists of the following data:

  11. Some results have been removed
Refresh