Write a pseudo code for sorting the numbers in an array?
Answers were Sorted based on User's Feedback
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 |
Give the expression for CMOS switching power dissipation?
2 Answers Cypress Semiconductor,
What types of high speed CMOS circuits have you designed?
Are you familiar with the term snooping?
In Verilog code what does “timescale 1 ns/ 1 ps” signifies?
What are the different design techniques required to create a layout for digital circuits?
Explain how logical gates are controlled by Boolean logic?
Explain the Charge Sharing problem while sampling data from a Bus?
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 ?
Explain the sizing of the inverter?
Explain about stuck at fault models, scan design, BIST and IDDQ testing?
what is SCR (Silicon Controlled Rectifier)?
If not into production, how far did you follow the design and why did not you see it into production?