Solve This (? + ? + ?=30)
If 1111=R, 2222=T, 3333=E, 4444=N Then 5555=?
Guess the Hindi Muhawara from the following whatsapp Emoticons?
Sweet, Medicine, Film, Girl, City, Car, Place, Doggy all are name same, guess which word it is?
A girl is blind, deaf, dumb and uneducated too. A boy loves her. How would he propose without touching her?
Four Question, One Answer: One River Name, One Flower Name, One Film Name, One Actress Name?
Guess me who am I, I am the first on earth, the second in heaven...
Which Indian cricketer is known as "Brown Bradman"?
English Egyptologist Harry Burton became internationally known for doing what?
The House of Lords Act, an Act of the Parliament of the UK, reformed the House of Lords by removing the centuries.......
printf("Enter 5 integers\n");
temp = a[j];
a[j] = a[j+1];
a[j+1] = temp;
printf("Second max number is %d\n",a);
Try the following algo -
1) Take two variable first and second. Initialize both as INT_MIN (i.e. -infinity)
first = second = INT_MIN
2) Loop through all the elements.
a) If the current element is larger than first, then update first and second.
b) Else if the current element is larger than second then update second
At the end you will get second as second max.
Say you are given two arrays where second array is duplicate with one missing element. What should be the best possible way to find that missing element -
Missing Element: 2
Forgot Your Password?
2018 © Queryhome