Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 2 If the following operations on the stack is performed and stack size is 5: push (1) pop ( : push (2) push (3)

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

QUESTION 2 If the following operations on the stack is performed and stack size is 5: push (1) pop ( : push (2) push (3) pop push (4) pop pop () push(5) After the last operation, the total number of elements present in the stack is 3 QUESTION 4 Which of the following represent the worst case input for an insertion sort? Array in sorted order Array sorted in reverse order Unsorted array Large array QUESTION 5 What is the worst case complexity of selection sort? oin log n) Monollog n) O(n) o(na) QUESTION 6 In array implementation of queue, where does a new element be inserted? At the top of the queue At the correct location At the end of queue At the front of the queue QUESTION 7 The result evaluating the postfix expression: 2 31 * +9. 2 -2 QUESTION 8 Consider an array, arr[4] = {9, 7, 4, 2). What are the steps of insertions done while running insertion sort on the array? 79424792 2479 09724 9247 2479 2749 2479 79424792 2479 QUESTION 9 If the elements 1. '2', '3' and '4' are added in a queue, what would be the order for the removal? Based on user input 4321 2134 1234 In insertion sort algorithm, the minimum key is repeatedly identified the sorted items are accumulated on the right the largest key is accumulated on the low indices O a number of items must be shifted to insert each item in its correctly sorted position QUESTION 11 Alinear list of elements in which insertion and deletion can be done only from one end is known as a Priority Queue Array Queue Stack QUESTION 12 The total number of swappings needed to sort the numbers 17.10.25. 13, 2015 in ascending order, using selection sort is O3 5 04 6

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago