wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> microsoft >> interview questions
(Message started by: kens on Feb 3rd, 2008, 6:22am)

Title: interview questions
Post by kens on Feb 3rd, 2008, 6:22am
Q.1  "jack jill" will be broken in tokens and then a document id list for 'jack' will be retrieved and similarly an document id list for 'jill' will be retrieved separately. Now how can we find those id's which contain both jack and jill?.


Q.2 there are random arrays on ‘n’ computer. Each of size of RAM of it’s computer. The arrays are not sorted. The problem was to sort the arrays.

Q.2 Imagine you have 10000 computer network and you are the admin of this network. how would you monitor the performance and how would you rectify the problem.


Q.3 If the mean faliure hour is 10,000 and 20 is the mean repair hour.If the printer is used by 100 customer, then find the availability.

Title: Re: interview questions
Post by kens on Feb 4th, 2008, 12:02pm
5)Given an array of red, green and blue balls arrange them in groups of all red together, greens together and blue together. Do in a single scan of the array.

6)Merge two linked lists without using extra memory.

Title: Re: interview questions
Post by R on Apr 14th, 2009, 10:49am

on 02/04/08 at 12:02:14, kens wrote:
5)Given an array of red, green and blue balls arrange them in groups of all red together, greens together and blue together. Do in a single scan of the array.

has been repeated here a lot many times. search for it.

Quote:
6)Merge two linked lists without using extra memory.

Merge two linked list ??? They are sorted or not?
For sorted case the following code will work and for unsorted case, just append one to the other.

Code:
node* merge(node *head1, node *head2)
{
  if(head1 == NULL)
  return head2;
  if(head2 == NULL)
  return head1;
  node* temp3 = null, temp1 = head1, temp2 = head2;
  if(temp1->data < temp2->data )
  {
       temp3 = temp1;
       temp1 = temp1->next;
  }
  else
  {
      temp3 = temp2;
      temp2 = temp2->next;
   }
   node *head = temp3;
  while(temp1 != NULL && temp2 != NULL)
  {
     if(temp1->data < temp2->data)
     {
         temp3->next = temp1;
         temp1 = temp1->next;
          temp3 = temp3->next;
      }
     else
     {
          temp3->next = temp2;
          temp2 = temp2->next;
          temp3 = temp3->next;
      }

   }
  if(temp1 == NULL)
  {
    if(temp2 == NULL)
    return head;
   else
   temp3->next = temp2;
  }
  else
  {
     temp3->next = temp1;
   }
  return head;
}

Title: Re: interview questions
Post by R on Apr 14th, 2009, 11:00am

on 02/03/08 at 06:22:34, kens wrote:
Q.2 there are random arrays on ‘n’ computer. Each of size of RAM of it’s computer. The arrays are not sorted. The problem was to sort the arrays.

If am getting it right, there are n very very large arrays (each one is of size of a RAM) we have to sort them.

If they had been sorted separately, then an n-way merge would have done. Still we can sort each array in its own computer and then apply n-way merge for all of them.

Title: Re: interview questions
Post by R on Apr 14th, 2009, 11:03am

on 02/03/08 at 06:22:34, kens wrote:
Q.1  "jack jill" will be broken in tokens and then a document id list for 'jack' will be retrieved and similarly an document id list for 'jill' will be retrieved separately. Now how can we find those id's which contain both jack and jill?.

You have now two arrays of IDs, the problem is just finding the intersection of the two arrays. Those will be the documents having both "jack" and "jill"

Title: Re: interview questions
Post by master2k10 on Dec 31st, 2009, 4:47am
1) solution1: merge two arrays and sort.
Traverse the sorted array . if if you find two id's in sequence then print it... continue till the end of the sorted array......
N = n1 + n2; (Combined length of the two arrays)

o(NlogN) for sort.
o(N) for traversal .

complexity o(NlogN)

2) solution2: create a hashtable of doc_id->count pair.

Traverse both array one at the same time fill/update the hashtable.

Traverse hashtable and look for count>1 and print those.

Time Complexity : o(N=(n1+n2));

Title: Re: interview questions
Post by bmudiam on Dec 31st, 2009, 8:32am

on 02/03/08 at 06:22:34, kens wrote:
Q.2 Imagine you have 10000 computer network and you are the admin of this network. how would you monitor the performance and how would you rectify the problem.


At that scale, you could only monitor the machines by their runtime statistics displayed on graphs because a picture is worth 1000 words.

Which problem are you asking about? network or computer?

If its  a network problem I will be at the center of all servers and all routers beside me..so I will restart router.

Title: Re: interview questions
Post by chu082011 on Jan 29th, 2012, 5:50pm
Hi,

Thank very much for your reply. It help me to think about for my ideals.

Tks again and pls keep posting.

Title: Re: interview questions
Post by jassmee on Apr 6th, 2012, 10:35pm
you provide the better information question related in interview such a good question . it is very helpful in my interview..

Title: Re: interview questions
Post by arun gupta on Apr 9th, 2012, 10:02pm
One of the most common question for interview is "Tell about your self"? Should i wait for interviewer to ask or i start by self?

Title: Re: interview questions
Post by LarryCurtis on Jun 29th, 2013, 12:34pm
intresting questions i hope no one ask me this while in a interview  ::)

Title: How to start our introduction
Post by ConnieBrocket on Aug 18th, 2014, 10:52pm
:)
I want to know how to start our introduction during interview.

Title: Re: interview questions
Post by towr on Aug 19th, 2014, 8:41am
"Hello world"?  :P

Title: Re: interview questions
Post by alien2 on May 16th, 2016, 7:54am

on 04/09/12 at 22:02:03, arun gupta wrote:
One of the most common question for interview is "Tell about your self"? Should i wait for interviewer to ask or i start by self?

I think therefore I am. I am a thinker rather than a stinker. I cannot me more or less than myself and I happen to be a beautiful person. So, when do I get started?

Title: Re: interview questions
Post by gitanas on Jun 21st, 2016, 3:46am
Anybody works in Microsoft?



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board