About 1,860,000 results
Open links in new tab
  1. Add two numbers represented by Stacks - GeeksforGeeks

    Jun 10, 2021 · Given two numbers N 1 and N 2 represented by two stacks, such that their most significant digits are present at the bottom of the stack, the task is to calculate and return the …

  2. Add Two Numbers Represented by Stacks - Naukri Code 360

    Mar 27, 2024 · To add two numbers, the least significant digit of the number should be at the bottom of the stack and other elements followed by it in the stack. After this, we will add two …

  3. c - Adding two numbers using stack-like arrays - Stack Overflow

    Apr 13, 2013 · Adding these numbers should now be straightforward. Pop a digit from each, add them, and push the result onto the outcome stack. To handle 99 + 99, you'll need to keep track …

  4. Addition 2 large number using stack in C language

    Aug 24, 2019 · My steps include pushing string 1(the first number) into stack 1, pushing str2 into stack 2, doing the addition and pushing to the third stack (I also use variable 'carry' and them …

  5. c - Adding 2 large numbers using stack? - Stack Overflow

    May 21, 2015 · node *top1,*top2,*top3; int i=0,n1,n2,flag=0,adder; char number1[50],number2[50]; printf("Enter the first number: "); scanf(" %s",number1); …

  6. 17 Adding Integers using Stack - YouTube

    Nov 17, 2020 · How to perform addition of two numbers with the help of Stack Data Structure.

  7. Add Two Numbers II - LeetCode

    Add Two Numbers II - You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contains a single digit. …

  8. Adding 2 numbers using stack? - C++ Forum - C++ Users

    Apr 13, 2011 · Write a function add() that pops the first number from the stack and saves it somewhere, than pops the second one and adds it to the first one. Then pushes the result.

  9. Write a program to add two large integers using stack - Blogger

    #include "stack.cpp" using namespace std; int main() {stacks<int> s1,s2,s3; t temp; int sum,n; char ch; do {sum=0; temp=0; cout<<"Enter the two large numbers to be added one by one:\n"; …

  10. c++ - Adding to very large numbers using stack - Stack Overflow

    Jan 9, 2021 · So, we need to add to all numbers 48 or, written as character '0'. Therefore, we add to all calculated digit values '0' (48) and get the character that we want. And this will be …

  11. Some results have been removed
Refresh