1.find the second maximum in an array?
2.how do you create hash table in c?
3.what is hash collision
Answer Posted / steven le
1. Selection sort with second pass
2. Basically we create a two dimension array (key, value)
and then we define a hash function to determine position of
elements when we insert/delete.
3. When two elements insert to the same spot in a hash
table, we have a hash collision. H(x1) = H(x2) = y
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Explain is it valid to address one element beyond the end of an array?
What is function prototype in c with example?
Is it better to bitshift a value than to multiply by 2?
Do you know the difference between exit() and _exit() function in c?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
What does sizeof int return?
What is an expression?
Who is the founder of c language?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.
What is the use of bit field?
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
Explain what are header files and explain what are its uses in c programming?
How to compare array with pointer in c?
How can you return multiple values from a function?