Q71easyWhen is Linear Search more appropriate than Binary Search?AWhen the computer is 64-bit.BWhen the array is very large.CWhen the data is unsorted and we only need to search once.DWhen memory usage must be minimized.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q72easyIn Big-O analysis, which of the following functions grows the slowest?AO(2^n)BO(n log n)CO(n)DO(log n)Check AnswerReveal Answer & ExplanationDiscuss on Board
Q73mediumA developer is choosing between two search algorithms. Algorithm A is O(N) and Algorithm B is O(log N). For an input of 1,000,000 items, which is significantly more efficient?ABoth are equally efficient for large data.BNot enough information.CAlgorithm BDAlgorithm ACheck AnswerReveal Answer & ExplanationDiscuss on Board
Q74easyA graph where every single vertex is connected to every other vertex is called a:ABipartite GraphBComplete GraphCConnected ForestDSimple GraphCheck AnswerReveal Answer & ExplanationDiscuss on Board
Q75mediumYou are using Open Addressing. You delete an element at index 5. Why shouldn't you just set table[5] = NULL?AIt may "break" the probe sequence, making other items that were placed after index 5 unreachable during a search.BIt causes a memory leak.CNULL values are not allowed in arrays.DSetting values to NULL is slow.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q76mediumA function needs to check if a sequence of brackets {[()]} is Balanced. Which structure should it use?ALinked ListBArrayCQueueDStackCheck AnswerReveal Answer & ExplanationDiscuss on Board
Q77easyIn Quick Sort, what is the role of the Partition step?ATo divide the array into two equal halves.BTo find the median value.CTo place the pivot in its correct sorted position and move smaller elements to its left and larger to its right.DTo sort the entire array.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q78easyWhat is the main goal of a Hash Function in a Hash Table?ATo distribute keys uniformly across the available buckets in the table.BTo encrypt data so it cannot be read.CTo sort the keys in ascending order.DTo compress the data to take up less space.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q79easyIn terms of Time-Space tradeoff, which of the following is true about searching?ALinear search uses the most memory.BWe can achieve O(1) search time by using a Hash Table, but at the cost of significantly higher memory usage.CSorting data reduces memory usage.DBinary search is O(1) in space and time.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q80mediumIn professional systems, why is mid = low + (high - low) / 2 used instead of mid = (low + high) / 2? ATo handle negative numbers in the array.BTo make the code run faster.CTo prevent integer overflow when searching in extremely large arrays.DTo ensure the result is always a float.Check AnswerReveal Answer & ExplanationDiscuss on Board