Found 423 Questions for Algorithms

Exponential Search

Paul Richard
Updated on 15-Jun-2020 14:10:42
Exponential search is also known as doubling or galloping search. This mechanism is used to find the range where the search key may present. If L and U are the upper and lower bound of the list, then L and U both are the power of 2. For the last section, the U is the last position of the list. For that reason, it is known as exponential.After finding the specific range, it uses the binary search technique to find the exact location of the search key.The complexity of Exponential Search TechniqueTime Complexity: O(1) for the best case. O(log2 i) ... Read More

Binary Search

Moumita
Updated on 15-Jun-2020 14:14:41
When the list is sorted we can use the binary search technique to find items on the list. In this procedure, the entire list is divided into two sub-lists. If the item is found in the middle position, it returns the location, otherwise jumps to either left or right sub-list and do the same process again until finding the item or exceed the range.The complexity of Binary Search TechniqueTime Complexity: O(1) for the best case. O(log2 n) for average or worst case.Space Complexity: O(1) Input and OutputInput:  A sorted list of data: 12 25 48 52 67 79 88 93 The ... Read More

Operating system time slicing in round robin scheduling

Arnab Chakraborty
Updated on 20-Jun-2020 09:50:34
process Burst time A 4 B 1 C 8 D 1time slice=10 unitA B C D A C C C 0 2 3 5 6 8 10 12 14So A will complete 8 cycles.
Advertisements