Microsoft Interview Report
- 1of 1 vote
AnswersGiven an array of integers, give the most efficient algorithm to find if the array has a majority element. If the array has a majority element, find this element. (Note : The majority element is the element that occurs more than half of the size of the array)
- @ce October 24, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Intern Algorithm - 1of 1 vote
AnswersWith a pointer to head node of a linked list as argument, write a function to swap the consecutive elements of the list and return the head node. (Do note change values of any node, only change the links.)
- @ce October 24, 2012 in India
Example :-
1->2->3->4->5->6->7
2->1->4->3->6->5->7| Report Duplicate | Flag | PURGE
Microsoft Intern Linked Lists
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.