Recursion
What is the term for an error in a program that prevents it from running as expected?
Syntax
Feature
Bug
Algorithm
Which quality is least relevant when determining if an algorithm is suitable for solving a specific problem?
Its ability to meet performance constraints
Its compatibility with expected input types
Its adaptability to varying input sizes
The aesthetic appeal of its written pseudocode
Which of these is used to represent characters using integers in computers?
Binary code
Hexadecimal
ASCII
Unicode
How many bits are typically in a byte?
16
32
4
8
Which technique minimizes space complexity while finding the kth smallest element in an unsorted array?
Quickselect using Hoare's partitioning scheme
Using a min-heap to extract elements up to k times
Implementing a binary search tree from array elements
Sorting the array using mergesort and taking the kth index
What is thrown when an array index is accessed with a value outside its valid range?
IllegalArgumentException
IndexOutOfBoundsException
OutOfMemoryError
ArrayIndexOutOfBoundsException
Given a recursive method that calculates factorials, what would cause a StackOverflowError to occur?
An iterative loop is used instead of recursion within the method.
The recursive call decrements the input value by one correctly.
Local variables are not properly initialized within the method body.
The base case is improperly defined, causing infinite recursion.

How are we doing?
Give us your feedback and let us know how we can improve
Which algorithm has the worst case time complexity for finding an element in a sorted list of integers?
O(n) with a linear search.
O(n \log n) with merge sort followed by a binary search.
O(\log n) with a binary search.
O(1) with direct access if indices are known.
When comparing two algorithms that calculate Fibonacci numbers, which approach typically increases the space complexity compared to others?
Using recursion without memoization.
Using dynamic programming with memoization.
Implementing matrix exponentiation method.
Iterative implementation using loop constructs.
For implementing a system that processes tasks with varying priorities, which data structure facilitates efficient priority-based task retrieval?
Linked List
Array List
Hash Set
Priority Queue