2 votes 2 votes An ideal sort is an in-place-sort whose additional space requirement is O (log$_2$ n) O (nlog$_2$ n) O (1) O (n) Algorithms ugcnetcse-dec2015-paper2 algorithms sorting space-complexity + – go_editor asked Aug 8, 2016 retagged Jul 12, 2019 by Cristine go_editor 2.2k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply anchitjindal07 commented Jul 31, 2018 reply Follow Share Answer is option A or option C? 0 votes 0 votes krishnapriya3110 commented Nov 16, 2019 reply Follow Share Option C O(1) 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes An ideal sort is an in-place-sort whose additional space requirement is log n for function call. A is answer Prashant. answered Aug 8, 2016 Prashant. comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes In its strictest form, the algorithm can only have a constant amount of extra space, counting everything including function calls and pointers. However, this form is very limited as simply having an index to a length n array requires O(log n) bits. More broadly, in-place means that the algorithm does not use extra space for manipulating the input but may require a small though non-constant extra space for its operation. Usually, this space is O(log n). Source : https://en.wikipedia.org/wiki/In-place_algorithm Sayan Bose answered May 5, 2018 Sayan Bose comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes space complexity for any algo is =input+extra .......and this extra generally depends on inplace or outplace nature....if inplace than extra is stack space i.e log n.............so option A eyeamgj answered May 10, 2018 eyeamgj comment Share Follow See all 4 Comments See all 4 4 Comments reply abhishekmehta4u commented May 10, 2018 reply Follow Share How stack space is logn?? 0 votes 0 votes eyeamgj commented May 10, 2018 reply Follow Share its a stack space to store function call ......just like a recursion 0 votes 0 votes abhishekmehta4u commented May 10, 2018 reply Follow Share But why logn .why not O(n)???? 0 votes 0 votes eyeamgj commented May 10, 2018 reply Follow Share just take an example of inplace and use stack to store the functions .............u will find maximum is log n. 0 votes 0 votes Please log in or register to add a comment.