search
Log In
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Sep 2019
  1. Satbir

    567 Points

  2. Bikram

    566 Points

  3. GAITONDE

    348 Points

  4. Vimal Patel

    87 Points

  5. Shaik Masthan

    38 Points

  6. BLACK_CLOUD

    14 Points

  7. sekhar_1621

    13 Points

  8. OgbeborBeatrice

    13 Points

  9. RAMYA.F

    9 Points

  10. vkw1111

    9 Points

Recent questions tagged sorting

0 votes
0 answers 4 views
Consider th following cases for quick sort to sort an array of n element $a[0...n-1]$ i) Choosing the pivot element randomly from the given array ii) choosing median element as pivot. Iii) Choosing middle element as pivot For which of the above cases quick sort always gives $O(nlogn)$ time complexity?
asked Sep 11 in Algorithms `JEET 144 points 4 views
0 votes
0 answers 2 views
Consider an array A of length n, array contain number between (1 – 10), in any arbitary order, best sorting algorithm takes $650$ ns if $n = 50$, the time required by algorithm if n = 300.
asked Sep 11 in Algorithms `JEET 144 points 2 views
1 vote
1 answer 14 views
An array is said to be -ordered if for each such that . for example, the array 1 4 2 6 3 7 5 8 is 2-ordered. In a 2-ordered array of 2N elements, what is the maximum number of positions that an element can be from its position if the array were 1-ordered?
asked Sep 1 in Algorithms Sambhrant Maurya 204 points 14 views
0 votes
0 answers 8 views
Below is the implementation of merge sort. void sort(int a, int lo, int hi){ if(hi<=lo) return; int mid = lo + (hi-lo)/2; sort(a,lo,mid); sort(a,mid+1,hi); merge(a,lo,mid,hi); } Assume that merge function merges the elements a[lo] to a[mid] and a[mid+1] to a[hi]. ... merge() whenever a[mid]<=a[mid+1]. The number of comparisons needed to merge sort a sorted array is: O(n log n) O(n) O(1) O(log n)
asked Sep 1 in Algorithms Sambhrant Maurya 204 points 8 views
0 votes
2 answers 26 views
Here the tightest lower bound means?. (Please suggest some source if possible for such questions) https://gateoverflow.in/1026/gate2004-29
asked Aug 26 in Algorithms Rishav_Bhatt 8 points 26 views
0 votes
0 answers 5 views
The time complexity of Topological sort is O(V+E) if we use the adjacency list(linked list representation). What will be time complexity when we use the adjacency matrix? Explain.
asked Jul 1 in Algorithms shubhamscifi 6 points 5 views
0 votes
1 answer 11 views
Is there overlapping of subproblem in merge sort? Can we solve merge sort using dynamic programming? please give some explanation.
asked Jun 25 in Algorithms Shubhm 20 points 11 views
0 votes
1 answer 23 views
________ is the sorting technique in which if we put an element in the appropriate place in a sorted list it should yield a larger sorted order list. A. insertion B. distribution C. selection D. extraction Answer: Option A please provide some explanation, i m not able to understand the question
asked Jun 20 in Algorithms Shubhm 20 points 23 views
To see more, click for the full list of questions or popular tags.
...