A Basic Quiz on Algorithms #1

Sort by

recency

|

30 Discussions

|

  • + 0 comments

    Solution:

    1:c
    2:b
    3:b
    4:a
    5:b
    6:a
    7:a
    8:c
    9:a
    10:e
    
  • + 0 comments

    For a better understanding of fundamental aspects of data structure and algorithms read domyhomework. You can find info on this algorithm there too.

  • + 0 comments

    how can i check my answer???

  • + 0 comments

    Hi.i can't clearly understand about the algorithm.can u explain me

  • + 2 comments

    Which of these is the time complexity involved in building a heap of n elements - and cannot be expressed in lower order terms ? How come the answer is not o(nlogn)? If you are talking about heap then it must be min heap or max heap.Max/Min heapify takes o(log(n)).So it should be o(nlogn).Please let me know if i am missing something.

    • + 1 comment

      There is an algorithm, invented by Floyd, that heapifies'' an array in O(n). It does it in a bottom-up manner, if you just insert each of the elements in a heap one by one of course it's O(n log n).

      http://www.cs.umd.edu/~meesh/351/mount/lectures/lect14-heapsort-analysis-part.pdf

      • + 0 comments

        Nice Explanation.Thanks! :)