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 |
Insights of a 2 input NOR gate. Explain the working?
Explain how logical gates are controlled by Boolean logic?
What are the different design techniques required to create a layout for digital circuits?
what is body effect?
Explain various adders and difference between them?
What is the difference between nmos and pmos technologies?
What happens to delay if you increase load capacitance?
What is the function of tie-high and tie-low cells?
What r the phenomenon which come into play when the devices are scaled to the sub-micron lengths?
Explain why & how a MOSFET works?
what is Slack?
verify nmos passes good logic 0 and passes bad logic 1.also verify that pmos passes good logic 1 and passes bad logic 0.
2 Answers Cosmic Circuits, HP,