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

Implement F = AB+C using CMOS gates?

2 Answers   Intel,


Basic Stuff related to Perl?

0 Answers   Intel,


Have you studied pipelining? List the 5 stages of a 5 stage pipeline. Assuming 1 clock per stage, what is the latency of an instruction in a 5 stage machine? What is the throughput of this machine ?

3 Answers   Intel,


Explain Process technology? What package was used and how did you model the package/system? What parasitic effects were considered?

0 Answers   Intel,


What are the different design techniques required to create a layout for digital circuits?

0 Answers  


what is Slack?

0 Answers  


Differences between DRAM and SRAM?

14 Answers   Infosys, Intel, University, Wipro,


Draw Vds-Ids curve for a MOSFET. Now, show how this curve changes considering Channel Length Modulation.

0 Answers   Infosys,


Calculate rise delay of a 3-input NAND gate driving a 3-input NOR gate through a 6mm long and 0.45&#61549;m wide metal wire with sheet resistance R = 0.065 &#61527;/ and Cpermicron= 0.25 fF/&#61549;m. The resistance and capacitance of the unit NMOS are 6.5k&#61527; and 2.5fF. Use a 3 segment &#61552;-model for the wire. Consider PMOS and NMOS size of reference inverter as 2 and 1 respectively. Use appropriate sizing for the NAND and NOR gate.

0 Answers  


What r the phenomenon which come into play when the devices are scaled to the sub-micron lengths?

4 Answers   Intel,


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

0 Answers   Infosys,


What is threshold voltage?

0 Answers  


Categories