ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Operating Systems  >>  Data Structures
 
 


 

 
 Windows interview questions  Windows Interview Questions
 Linux interview questions  Linux Interview Questions
 Unix interview questions  Unix Interview Questions
 Solaris interview questions  Solaris Interview Questions
 RTOS interview questions  RTOS Interview Questions
 Bulnex interview questions  Bulnex Interview Questions
 Operating Systems General Concepts interview questions  Operating Systems General Concepts Interview Questions
 Data Structures interview questions  Data Structures Interview Questions
 Operating Systems AllOther interview questions  Operating Systems AllOther Interview Questions
Question
A list is ordered from smaller to largest when a sort is
called. Which sort would take the shortest time to execute?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: A list is ordered from smaller to largest when a sort is called. Which sort would take the shortest time to execute?
Answer
# 1
quick sort
 
Is This Answer Correct ?    0 Yes 0 No
Ganesan
 
  Re: A list is ordered from smaller to largest when a sort is called. Which sort would take the shortest time to execute?
Answer
# 2
Quick Sort
 
Is This Answer Correct ?    0 Yes 0 No
Pavan
 
 
 
  Re: A list is ordered from smaller to largest when a sort is called. Which sort would take the shortest time to execute?
Answer
# 3
Selection Sort
 
Is This Answer Correct ?    0 Yes 3 No
Dwiti
 
  Re: A list is ordered from smaller to largest when a sort is called. Which sort would take the shortest time to execute?
Answer
# 4
insertion sort.
all the above answer r wrong.
 
Is This Answer Correct ?    0 Yes 0 No
Punit
 
  Re: A list is ordered from smaller to largest when a sort is called. Which sort would take the shortest time to execute?
Answer
# 5
Yes, its insertion sort. For a sorted array, it takes just
O(n) time. iTs mere traversal of an array as it is already
sorted. In the case of quick sort, it boils down to O(n^2)
in the case of sorted array.
 
Is This Answer Correct ?    1 Yes 0 No
Sathyanarayana
 
  Re: A list is ordered from smaller to largest when a sort is called. Which sort would take the shortest time to execute?
Answer
# 6
Bubble sort with a flag variable to check if comparisons 
occur or not. If it is already sorted then in just 1 
iteration it will show that the array is sorted which is 
not possible in any other sort.THUS JUST 1 ITERATIION IS 
REQUIRED IN THIS CASE.
 
Is This Answer Correct ?    3 Yes 0 No
Rohit
 
  Re: A list is ordered from smaller to largest when a sort is called. Which sort would take the shortest time to execute?
Answer
# 7
insertion sort works efficiently on sorted lists.....
 
Is This Answer Correct ?    2 Yes 1 No
Varma
 
  Re: A list is ordered from smaller to largest when a sort is called. Which sort would take the shortest time to execute?
Answer
# 8
Insertion sort works with an efficiency of O(n) if the array
is already sorted. Hence, this algo can be used.
 
Is This Answer Correct ?    1 Yes 0 No
Sathya
 

 
 
 
Other Data Structures Interview Questions
 
  Question Asked @ Answers
 
What is the average number of comparisons in a sequential search?  2
When will you sort an array of pointers to list elements, rather than sorting the elements themselves?  2
Which data structure is needed to convert infix notations to post fix notations? Fidelity8
Convert the following infix expression to post fix notation ((a+2)*(b+4)) -1  7
sir plz. send me a bunch of questions related to this topic which may help me in campus selection ABC1
A list is ordered from smaller to largest when a sort is called. Which sort would take the longest time to execute?  4
The element being searched for is not found in an array of 100 elements. What is the average number of comparisons needed in a sequential search to determine that the element is not there, if the elements are completely unordered? Morgan-Stanley7
What are the parts of root node? BMC2
How will inorder, preorder and postorder traversals print the elements of a tree?  6
What is a data structure? Keane-India-Ltd3
Parenthesis are never needed in prefix or postfix expressions. Why?  6
In which data structure, elements can be added or removed at either end, but not in the middle? Wipro19
Write a Binary Search program  2
What do you mean by: Syntax Error, Logical Error, Runtime Error?  2
How many different binary trees and binary search trees can be made from three nodes that contain the key values 1, 2 & 3? iGate9
Which sort show the best average behavior?  6
Explain about the types of linked lists  4
Write programs for Bubble Sort, Quick sort  2
What is the maximum total number of nodes in a tree that has N levels? Note that the root is level (zero) Sasken10
Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements. Syntel9
 
For more Data Structures Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com