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...


Write a pseudo code for sorting the numbers in an array?

Answers were Sorted based on User's Feedback



Write a pseudo code for sorting the numbers in an array?..

Answer / prabhath

SelectionSort(A)
for i <- length[A]-1 downto 0
for j <- 0 to i
if (A[j]>MAX) // for descending, change this to MIN
MAX=A[j]
MAX_ID=j

temp=A[i]
A[i]=A[MAX_ID]
A[MAX_ID]=temp

Slow motion run of Selection Sort (Bold == sorted region):

5 1 3 2 4
4 1 3 2 5
1 3 2 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5 >> done

Is This Answer Correct ?    22 Yes 14 No

Write a pseudo code for sorting the numbers in an array?..

Answer / vicneswary

5 1 3 2 4
1 3 5 2 4
1 2 3 5 4
1 2 3 4 5

Is This Answer Correct ?    3 Yes 8 No

Post New Answer

More VLSI Interview Questions

While using logic design, explain the various steps that r followed to obtain the desirable design in a well defined manner?

1 Answers   Intel,


Explain the operation considering a two processor computer system with a cache for each processor.

0 Answers   Intel,


What was your role in the silicon evaluation/product ramp? What tools did you use?

0 Answers   Intel,


In what cases do you need to double clock a signal before presenting it to a synchronous state machine?

1 Answers   Intel,


Draw a 6-T SRAM Cell and explain the Read and Write operations

0 Answers   Infosys,


Basic Stuff related to Perl?

0 Answers   Intel,


In the design of a large inverter, why do we prefer to connect small transistors in parallel (thus increasing effective width) rather than lay out one transistor with large width?

0 Answers   Infosys,


Explain why present VLSI circuits use MOSFETs instead of BJTs?

0 Answers  


Explain the working of differential sense amplifier?

1 Answers  


Explain the difference between write through and write back cache.

2 Answers   Intel,


For a single computer processor computer system, what is the purpose of a processor cache and describe its operation?

3 Answers   Intel,


Have you studied buses? What types?

1 Answers   Intel,


Categories