Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

A list is ordered from smaller to largest when a sort is
called. Which sort would take the shortest time to execute?

Answer Posted / rohit

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 ?    27 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can arraylist store primitives?

940


What member function places a new node at the end of the linked list?

1066


Explain extended binary tree.

969


Which interface treemap implements?

979


List the applications of queues?

935


Can constructor be static?

941


Is hashset a collection?

929


What is binary tree in computer science?

921


What are sorting algorithms used for?

980


How to find the duplicate in an array?

958


How can you represent a linked list node?

955


Differentiate between hashset and hashmap.

993


What is ds tree?

908


Is array size dynamic or fixed?

971


Explain the terms base case, recursive case, binding time, run-time stack and tail recursion.

893