Solution:
Stack Data Structure:
Stack is a straight information structure , in which inclusion and erasure happens on the highest point of stack. for instance a heap of textbook,if you need to keep a book on heap then it will be included top of heap and in the event that you need to expel a book from it will be expelled from top of heap of books.
digaram-
book3 |
book2 |
book1 |
stack of books
adding a book 4 to stack-:
book4 |
book3 |
book2 |
book1 |
book4 has been added at the top of stack.
removing a book from stack-:
book3 |
book2 |
book1 |
book4 has been removed from top.
Thus, insertion and deletion occurs at the top of stack.
Unique Structural behavioural Concepts:
it unique structural and behavioural concepts are -
on the basis of structure and behaviour,it is a collection of objects in a well defined manner ,which follows some rules to become part of collection like it will be added at top of collection and if removed the will be from top. Follows LIFO (last in first out) technique.
Most frequently used methods
Its most frequently used methods are-
Implementations Provided
Practical application of Stack
one of the most practical application application supported by stack is Function Calls in recursions.first called function is returned at last and last called function is value is returned fast. for example - computing factorial by recursion.
Parsing in compilers, Sorting numbers from decreasing to increasing order and vice versa.
Finding a path through maze using Stack
starting and target locations are considered and every move in the maze (left ,right ,up, down ) is tracked using stack .if a move is made and it keeps on and stored in stack and if a situation occurred like no opening square is available then pop() is applied until we get a path towards target,like this push and pop operation are applied to achieved target location in the maze.
Discuss the stack data structure. What are its unique structural and behav- ioral concepts? What are...
help me answer the following questions please 1. Stack (LIFO) & its application 1. Stack overflow & underflow 2. Implementation: partially filled array & linked list 3. Applications: reverse string, backtracking Exercises: 1) Which of the following applications may use a stack? A. parentheses balancing program. B. Keeping track of local variables at run time. C. Syntax analyzer for a compiler. D. All of the above. 2) Consider the usual algorithm for determining whether a sequence of parentheses is balanced....
Lab 3 – Array-Based Stack and Queue Overview In this assignment, you will be implementing your own Array-Based Stack (ABS) and Array-Based Queue (ABQ). A stack is a linear data structure which follows the Last-In, First-Out (LIFO) property. LIFO means that the data most recently added is the first data to be removed. (Imagine a stack of books, or a stack of papers on a desk—the first one to be removed is the last one placed on top.) A queue...
**TStack.py below**
# CMPT 145: Linear ADTs
# Defines the Stack ADT
#
# A stack (also called a pushdown or LIFO stack) is a compound
# data structure in which the data values are ordered according
# to the LIFO (last-in first-out) protocol.
#
# Implementation:
# This implementation was designed to point out when ADT operations are
# used incorrectly.
def create():
"""
Purpose
creates an empty stack
Return
an empty stack
"""
return '__Stack__',list()
def is_empty(stack):
"""...
Using C++ in Visual Studios
Rewrite the code to use a Stack instead of a Queue. You will
need to think about the differences in the Stack and Queue. Think
about how they operate and how the nodes may differ.
Modify the code as necessary.
You will need to push to the Stack, pop from the Stack, peek at
the Stack. You will need a member functions like in the example
code. Your program will need to show that everything...
-We focus on the behavioural consequences of satisfaction that relate to profit Three key behav ioural measures: 1. Customer retention; This is measured as: • Repeat purchase with durables such as cars • Continuity of use with utilities and a v ariety of serv ice prov iders 2. Share of category requirement (SCR) This is the proportion of category spending that goes to a particular brand This applies in repertoire categories such as groceries, hotels and supermarkets 3. Voice •...
In this assignment you’ll implement a data structure called a trie, which is used to answer queries regarding the characteristics of a text file (e.g., frequency of a given word). This write-up introduces the concept of a trie, specifies the API you’re expected to implement, and outlines submission instructions as well as the grading rubric. Please carefully read the entire write-up before you begin coding your submission. Tries A trie is an example of a tree data structure that compactly...
DQ1. What is an Audit Work Program (some call it Audit Program)?
The audit work program - Email Surveillance Audit Program – What is
the structure and contents including various audit steps. Find 1-2
steps in the audit program where the audit software can be used.
How can audit software be used to gather evidence?.
(the Audit program (Email Surveillance Audit Program
details is attached).
DQ3. Review the contents of the Audit Manual of Office of
University Audits at University...
(+10) Answer the following questions in terms of the structure
chart below.
A. What modules directly use
the services of module E?
a. A C
D
b. B
C
c.
D
d. None of these
B. The services of which
modules are directly used by module A?
a. C and
D
b. B C D
c. B D d. B C
(+5) Based on the same structure above, in which module does the
data item w originate?
a.
B ...
CASE STUDY An integrated delivery network (IDN) serving a large urban fed with high-value data from each of the clinical systems. and rural demographic area is using separate EHR systems The outpatient EHR's MPI already was being used as the mas- ts inpatient and outpatient settings. Some of the specialty ter unique identifier for most of the IDN's systems, so it can be departments have also purchased their own systems for doc incorporated with the new CDR. A robust IE...
1) analyze the following case 2) give a summary and suggest ways for the company —————— Salesforce.com, one of the most disruptive technology companies of the past few years, has single-handedly shaken up the software industry with its innovative business model and resounding success. Salesforce provides customer relationship management (CRM) and other application software solutions in the form of software as a service leased over the Internet, as opposed to software bought and installed on machines locally. The company was...