1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
muminat
4 years ago
7

Explain how to implement two stacks in one array A[1..n] in such a way that neither stack overflows unless the total number elem

ents in both stacks together exceeds n. Show your work for the new PUSH,POP operations
Computers and Technology
1 answer:
algol [13]4 years ago
5 0

Answer:

Check explanation

Explanation:

Two stacks can make use of one array by utilizing various stack pointers that begins from different ends of an array. Looking at the array A[1...n], the first stack will drive elements that starts from position 1 as well as to move its' pointer to n.

The Second stack will begin at the n position and motion its' pointer to 1. The best likely divide is to offer each stack a half of an array. whenever any of two stacks transverse the half-point, an overflow can happen but for that overall number of elements, it must be n

You might be interested in
Can someone please explain binary addition to me? i have a test tomorrow yikes
umka2103 [35]

Answer:

its easy

Explanation:

there are are 5 main rules

in binary there are 2 number 0 and 1

0 + 0 = 0

0 + 1 = 1

1+0=1

1+1=0 carry 1

e . g

1 1 1

1 0 1 0 1 0

+ 1 1 0 0 1 0

-------------------------

1 1 1 1 1 0 0

*in bold are the ones that you need to carry.

in decimal there are 10 possible numbers 0- 9

when you do 1 + 9 it becomes 10, this can be done easily, however if you do 1 + 9 in a table like above, you will get 0 for the first column and you will carry 1 to the next column .

in binary is the same idea but using on 2 numbers 1 and 0

e.g

1

1

+ 9

----------

1 0

*in bold are the ones that you need to carry.

hope it helps and good luck in your exam.

3 0
3 years ago
Downlad the file and write a program named Lab10b_Act2.py that does the following: Opens the CSV file for reading Reads the CSV
a_sh-v [17]
他們會不會是因為這樣就是說他們的問題,他們會會覺得委屈覺得我
5 0
3 years ago
Observing users as they enter passwords or other personal information to a computer Auditing software often used to test compute
GuDViN [60]

Answer:

Explanation:

1. Observing users as they enter passwords or other personal information to a computer Auditing software often used to test computer data - (shoulder surfing)

2. An acronym for security institute that studies computer crime activities The act of altering data that are entered into, or used by, a computer --- (CSI)

3. A small text file that stores information about your browsing habits and interests Stealing personal information from trash cans - (COOKIES)

4. A software program specifically designed for computer forensic investigations - (EnCase)

5. A type of fraud in which the perpetrator steals small amounts from many different accounts - (salami technique)

6. A software program or hardware device designed to prevent unauthorized data communications - (firewall)

7. Malicious software similar to a computer virus -- (_worm)

8. Federal legislation aimed specifically at computer crime (CFAA)

8 0
3 years ago
What is a device that makes it possible for multiple customers to share one address is called a/n
chubhunter [2.5K]
I'm totally not sure but I think sec midterm flashcards
4 0
4 years ago
A __________ is a repository of data gathered from operational data and other sources that is designed to serve a particular com
VMariaS [17]
Data Mart is a smaller amount of data that is collected from a data warehouse.
8 0
3 years ago
Other questions:
  • Currently, there are two major techniques used to develop programs and their procedures. name and describe them. html editor key
    11·1 answer
  • 13) Search engines and metasearch engines are examples of which network application?
    12·1 answer
  • *blank* is the unauthorized copying and selling or distributing of licensed video games.
    10·1 answer
  • What the best option if you cant show your PowerPoint presentation at all
    6·2 answers
  • Which invention spurred the development of the digital camera?
    8·1 answer
  • What have very strong chemical bonds and cannot be reshaped when heated.​
    6·1 answer
  • Radio waves can be used to transmit energy. What is an advantage of this method in computer technology
    7·2 answers
  • Which statement is true?
    12·2 answers
  • 4. What are the things that a computer literate understands?name them
    5·2 answers
  • Please give answer before explanation
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!