About 2,160,000 results
Open links in new tab
  1. Reverse a String using Stack - GeeksforGeeks

    Apr 4, 2025 · Follow the steps given below to reverse a string using stack. Create an empty stack. One by one push all characters of string to stack. One by one pop all characters from stack …

  2. Reverse a string using stack in C++ - CodeSpeedy

    In this tutorial, we will learn to reverse a string using the stack in C++. For Example: Reverse the given string. Simple Method: Firstly, create a swap function. Then, simply create a reverse …

  3. Reverse a string using a stack data structure | Techie Delight

    Dec 1, 2021 · This post will discuss how to reverse a string using the stack data structure in C/C++, Java, and Python using explicit stack and call stack.

  4. Write a Program to Reverse a String Using Stack

    Write a C, C++ program to reverse a string using Stack data structure. In this question, A string is input by a user and our program will reverse a string using a Stack. Stack is an abstract data …

  5. (C++) Reversing a string using stacks? - Stack Overflow

    Oct 27, 2014 · I'm trying to reverse a string using stacks. It correctly reverses the string, but the for loop crashes when i reaches 0. I get a " string subscript out of range " error. Currently the …

  6. Program Reverse a String using Stack in C++ - algolesson.com

    Apr 7, 2022 · Problem: Given a String, reverse the given string using stack. Steps to reverse the string using stack. Create one empty Stack. Push all the characters of the given string one by …

  7. C++ Program to Reverse a String Using Stack - GeeksforGeeks

    Dec 18, 2023 · Given a string, reverse it using stack. For example "GeeksQuiz" should be converted to "ziuQskeeG". Following is simple algorithm to reverse a string using stack. 1) …

  8. Program to Reverse a String using a Stack Data Structure in C++

    May 7, 2024 · In C++, we use stack<type>, where type is the data type of the stack (like integer, character, string, etc). Then, using the push function, add the characters from the string one by …

  9. Reverse a String using Stack - Naukri Code 360

    Mar 27, 2024 · Below are the following steps to reversing a String using Stack. String to Char []. Create a Stack. Push all characters, one by one. Then Pop all characters, one by one and put …

  10. How can a string can be reversed using the stack?

    Nov 8, 2015 · Push the whole string onto the stack, one element at a time. Then pop the whole string off of the stack, one element at a time. The string is now reversed.

  11. Some results have been removed
Refresh