GATE Exam | Aptitude Questions | GATE Syllabus | GATE Result | Mock Test | GATE Preparation
Best Answer to Any Question
Email or Username
I forgot my password
Ask a Question
Recent questions tagged algorithm
Ask a question:
Why is quicksort better than other sorting algorithms in practice?
In a standard algorithms course we are taught that quicksort is O(nlogn) on average and O(n2) in the worst case. At the same time, other sorting algorithms are studied which are O(nlogn) in the worst case (like mergesort and heapsort), and even linear time in the best case (like bubblesort) but with some additional needs of memory. Also, consider that students learn in basic programming courses that recursion is not really good in general because it could use too much memory, ... Does it have to do with the way memory works in computers? I know that some memories are way faster than others, but I don't know if that's the real reason for this counter-intuitive performance (when compared to theoretical estimates).
How to come up with the runtime of algorithms?
big-O notations like O(n) time taken by an algorithm, how do you calculate it for a given algorithm.
Big O notation and Worst case Analysis of an Algorithm?
in this we will ans the following question Is big-O notation a tool to do best, worst, & average case analysis of an algorithm? Big O for worst-case running time and Ω is for the best-case, but why is Ω used in worst case sometimes? What is the difference between Big O notation and Worst case Analysis of an Algorithm? As for my understanding both will give upper bound of any given function. Please explain the difference. There is a common misconception that Big-O means worst-case, Big-Omega means best-case, Big-Theta means average-case. How do O and Ω relate to worst and best case?
data structures and algorithms
To see more, click for the
full list of questions
The best answer to any question