Question: NOTE : the Subject is Data Structure in java code) Q1: Consider an array to be searched using sequential. The item we want to search
NOTE : the Subject is Data Structure in java code)

Q1: Consider an array to be searched using sequential. The item we want to search is not present in the array. The time taken by the search is a) O(n) time b) O(na) time c) Ollog(n)) time d) 0(1) time Q2: What is the output for the code fragment given below for a call function (5)? function(int n){ if(n== 0) return 0; else return n + function(n-1); } a) 20 b) 15 c) 10 d) 120 Q3: For the small data size, which one the following is the preferred data structure a) Single Linked List b) Double Linked List C) Array d) None of the above 04: Which one of the following data structure best suited to maintain a record of past events. a) Single Linked List b) Double Linked List c) Array d) Stack Q5: Consider a sorted array of 1 million integers. Which algorithm best suited to apply the search: a) Binary Search b) Sequential search c) Quick Sort d) Bubble Sort
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
