1. Basic operations that can be performed on the Stack:
POP: is uded to remove the top element of the statck
PUSH: to add a new element on the top of the Stack
PEEK: is uesd to get the top element of the stack not
removed.
isEmpty: to query if the stack is empty or no element
Element can be removed from the top of the stack as:
let i points to the last element of the array
a: removedElement = Array[i]
b: Array[i] = null or some other clearing data as 0
c: i-- i.e. decrement index
Characteristic to generic linked list
a linked llist is a data structure that is used to store data into
non contagious memory spaces and these space or nodes are
interlinked by containg the reference to the next or previous
nodes.
A generic Linklist is used to store a data of any type may be
Integer, Double, or some userdefined Objects
Element can be added to generric LL using
linkedlist add method which has two version as
ll.add(Object o)
ll.add(int index, Object o)
also elements can be added to first and last of the linkedlist
using
ll.addLast(Object o)
ll.addFirst(Object o)
and can be removed using
ll.remove(Object o)
ll.remove(int index, Object o)
ll.removeFirst()
ll.removeLast()
Question 9 0 / 10 points Describe the basic operations that can be performed on a...
Question 7 0 / 10 points What is a Java Interface and what role can it have in developing Data Structures? Support your answer with an example of such an interface. No text entered - Question 8 (10 points) What is meant by a static data structure? In your opinion, what are the advantages and disadvantages of such structures? Do you feel that the advantages outweigh the disadvantages? Question 9 0 / 10 points Describe the basic operations that can...
Uses chapter 6 from the freeley text for the course
Question 1 10 pts To promote intelligent and effective argumentation, a debate proposition must have certain characteristics. Please list each of these characteristics. (Your response for this question may be a list or bullet points and not a complete sentence.)
QUESTION 1 In a tree, a ____ is a node with successor nodes. root child descendent parent sibling QUESTION 2 In a tree, the ____ is a measure of the distance from a node to the root. count degree branch height level QUESTION 3 Which of the following is not a characteristic of a binary search tree? Each node has zero, one, or two successors. The preorder traversal processes the node first, then the left subtree, and then the right...
Describe an algorithm for finding the maximum (Large) value infinite sequence of integer 1.1 /10 points: Write a single sentence de- scribing what the question is asking 1.2 /10 points: Provide a list of other useful resources and references. 1.3 /10 points: Give a list of key assumption: and general observations /10 points: Summarize your calculati and other work /10 points: Discuss your solution, a plain why you believe it is correct
Question 5 (10 Points) Write a well-documented, Python program, hmwk305.py that implements the Selection-Sort algorithm. Selection-Sort segments the list into sorted and unsorted elements. The algorithm continues to remove the smallest element of the unsorted list and adds it to the sorted segment. Implement the algorithm that accepts an unsorted list and returns a sorted one - in ascending order. 5 3 8 Initial List 4 6 18 4 6 Minimum Swaps Position: Sorted List Length 1 Minimum Swaps Position:...
Can you please help with the below? 1) Which of the following is true about using a 2-3-4 tree? a. It is designed to minimize node visits while keeping to an O(log n) search performance b. It is designed to self-balance as new values are inserted into the tree c. As soon as a node becomes full, it performs the split routine d. None of the above 2) Which of the following is true about a binary search tree? a. ...
JAVA 3 LECTURE REVIEW PLEASE NEED ANSWERS ASAP. DUE IN AN HOUR!!! Question 12 points The best-case performance for a shell sort is: --- O(1) O(n2) O(n) O(n log n) Signaler cette question Question 22 points The best-case performance for an array of n items using insertion sort is: --- O(n2) O(n) O(1) there is no best-case Signaler cette question Question 3 2 points A recursive method that processes a chain of linked nodes --- uses the first node in...
Describe the four types of reasoning CDS systems use. Don't list them...DESCRIBE!! Be sure to include the various aspects of each type of system. Describe the three primary ethical issues discussed in your reading (Chapter 19 Clinical Decision Support Systems). Use your own words and be thorough in your description. No citation necessary. (6 points total - 2 points each) Compare and contrast the two main types of CDSS (6 points total - 3 points each). This criterion is linked...
CS 215 Program Design, Abstraction, and Problem Solving Programming Project #3 INTRODUCTION The goal of this programming project is to enable the student to practice designing a program that solves a problem using a class and a linked-list and developing a C++ program to implement the solution. PROJECT TASKS 1. Read the problem definition below and then analyze it before designing a solution. You will produce a document (external documentation) of this definition, analysis, and design. 2. Write a C++...
C++ Linked List Implementation Motivation As we discussed in class, the data structures that you use to implement your program can have a profound impact on it's overall performance. A poorly written program will often need much more RAM and CPU time then a well-written implementation. One of the most basic data structure questions revolves around the difference between an array and a linked list. After you finish this assignment you should have a firm understanding of their operation. Problem...