Crowdly
Add to Chrome
Questions Bank (1251540 total)
What is the time complexity of removing the last element (with previous) of a LinkedList?
O(n)
❌
O(1)
0%
O(log n)
0%
O(n^2)
0%
View this question
What is the Big-O of the following cycle: for (int i=0; i<N*N; i++) {System.out.println(i);}
O(n)
❌
O(2^n)
❌
O(log n)
❌
O(n^2)
✅
View this question
Stack method: ... - Retrieves and deletes the topmost element of the stack
T dequeue(T)
❌
T pop()
✅
T peek()
❌
int size()
❌
View this question
Which of the following is an example of linear complexity?
Heap sort
0%
Binary search
0%
Recursive Fibonacci calculation
0%
Iterative loops based on input size
0%
View this question
In a queue, which operation retrieves but does not remove the front element?
Enqueue
❌
Push
❌
Peek
✅
Dequeue
❌
View this question
What is the primary disadvantage of a linked list compared to an array?
It has fixed size.
❌
It requires more memory due to storing pointers.
✅
Insertion and deletion are slower.
❌
Accessing elements by index is faster.
❌
View this question
What does a hash function do?
Generates unique random numbers
❌
Maps data to a fixed range of integers
✅
Splits data into smaller parts
❌
Organizes data in ascending order
❌
View this question
What is the complexity of accessing the kth element in a singly linked list?
O(n)
0%
O(1)
0%
O(log n)
0%
O(n^2)
0%
View this question
Choose logical data structure
ArrayList
0%
Hash-table
0%
Linkedlist
0%
Array
0%
View this question
What is the purpose of rehashing in a hash table?
To increase the number of buckets when the load factor is exceeded.
0%
To delete elements from the table.
0%
To handle collisions by probing new indices.
0%
To optimize the hash function.
0%
View this question
Previous
1
More pages
122619
122620
122621
122622
122623
More pages
125154
Next
Telegram
Instagram
TikTok
Question Bank
Terms of Use
Contact Us
Add to Chrome