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 |
If the current thru the poly is 20nA and the contact can take a max current of 10nA how would u overcome the problem?
Implement a 2 I/P and gate using Tran gates?
If not into production, how far did you follow the design and why did not you see it into production?
What are the changes that are provided to meet design power targets?
What happens to delay if we include a resistance at the output of a CMOS circuit?
Approximately, what were the sizes of your transistors in the SRAM cell? How did you arrive at those sizes?
Differences between Signals and Variables in VHDL? If the same code is written using Signals and Variables what does it synthesize to?
Describe a finite state machine that will detect three consecutive coin tosses (of one coin) that results in heads.
0 Answers Intel, Sun Microsystems,
What are the different gates where boolean logic are applicable?
Explain Cross section of an NMOS transistor?
Explain Basic Stuff related to Perl?
Differences between DRAM and SRAM?
14 Answers Infosys, Intel, University, Wipro,