Access Millions of academic & study documents

Onlinear Data Structures

Content type
User Generated
Subject
Computer Science
Type
Homework
Showing Page:
1/6
Running head: Nonlinear data structures
1
NONLINEAR DATA STRUCTURES, FLOWCHARTS AND PSEUDOCODE FOR STACKS AND QUEUES
STUDENT’S NAME
COURSE TITLE
DATE: September 15, 2019

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/6
Data structure
a. A flowchart to represent the Push and Pop operations for a Stack based on a linked
list data structure.

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/6

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 6 pages?
Access Now
Unformatted Attachment Preview
Running head: Nonlinear data structures NONLINEAR DATA STRUCTURES, FLOWCHARTS AND PSEUDOCODE FOR STACKS AND QUEUES STUDENT’S NAME COURSE TITLE DATE: October 14, 2017 1 Data structure a. A flowchart to represent the Push and Pop operations for a Stack based on a linked list data structure. Data structure b. A Flowchart to represent the Enqueue and Dequeue operations for a Queue based on a linked list data structure. Data structure c. Java code to implement either a Stack or a Queue data structure based on a linked list. public class Queueclass { private static final int capacity = 3; int arr[] = new int[capacity]; int siz = 0; int top = -1; int bottom = 0; //push method public void push(int pelem) { if (top < capacity - 1) { top++; arr[top] = pelem; System.out.println("Element " + pelem + " is pushed to Queue !"); display(); } else { System.out.println("Overflow !"); } } //stack pop method public void pop() { if (top >= bottom) { bottom++; System.out.println("Pop operation done !"); display(); } else { System.out.println("Underflow !"); Data structure } } //shows the elements of the queue public void display() { if (top >= bottom) { System.out.println("Elements in Queue : "); for (int i = bottom; i ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Similar Documents