What is the complexity of the following tasks? 1) Finding the largest two elements in a queue
Fantastic news! We've Found the answer you've been seeking!
Question:
What is the complexity of the following tasks?
1) Finding the largest two elements in a queue of size n+3 using Naïve search.
2) Remove the first item at the bottom of a stack data-structure of size n.
3) Inserting an item in a queue data-structure, this has already n elements.
4) Searching for a pattern of size K into a string of size T using KMP algorithm.
5) Searching for a pattern of size L into a string of size Y using Naïve algorithm.
6) Computing the mathematical average of all items in a queue of size 2n.
7) Searching for an element on a sorted list of length M using Binary Search algorithm.
8) Traverse a graph of N nodes and E edges using Breadth First Search algorithm
Related Book For
Posted Date: