Microsoft Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
1
of 1 vote

2
586
314
7

- pusi August 23, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

7
364
182
5

- Anonymous September 23, 2009 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

Here is another:
___
| 7 |
=============
| 3 | 1 | 6 |
=============
| 5 | 8 | 4 |
=============
| 2 |
=====

The only thing to see here is... putting '1' & '8' at the middle position of the middle row. Thereafter, placing others is just a matter of time

- B August 24, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

2
685
413
7
this is also same as above

- Anonymous August 23, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

2
683
415
7

- ... August 24, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

the same as one the above..i didn't see..

- ... August 25, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Another one is

2
483
716
5

- bittu August 26, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

12 solutions in total.

- espresso August 27, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

7
2 5 8
6 1 3
4

- Anonymous September 13, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

7
2 5 8
6 1 3
4

- micky September 13, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Ur answer is wrong.5 and 6 are side by side.

- vidya October 02, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

One thing that we have to see if that middle number is 2 and 3 are adjacent to 6 number. So if we take numbers from 1 to 8 then only 1 and 8 satisfy the condition that there are 6 number in the series that are not adjacent to them......Placing other number is just a matter of time.......

- kunalgaind October 23, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Hi,

In my opinion, number of possible seating arrangements has more value addition to the conversation than providing a sample case.

I see 12 as one of the answer. Can some help us understand about the manipulations behind it.

By doing mathematics,
Total possible seating arrangements = 8!
Total coupling in the arrangement = 15
8! = n(X=0) + n(X=1) + n(X=2).......n(X=15)
I think for X>5 , n(X) =0;

I am thinking , Can anyone join the pieces?

- Mr Anonymous December 05, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

6
835
271
4

- Anonymous December 09, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Incorrect because 7 and 8 are diagonally adjacent

- Answer? May 07, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

7
314
586
2

- Anonymous June 11, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

4
713
286
5

Always select number which has less adjacents and keep them where possibility of lessa djacent's locations.

- mlakshmanarao August 02, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

5
2 4 3
7 8 6
1

- harish October 12, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

7
413
685
2

- Anonymous February 23, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

2
5 8 6
3 1 4
7

- Anonymous September 01, 2019 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

7
316
584
2

- Meena June 28, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

0,1,2,5,20,25,?,?

- Anonymous February 19, 2019 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

2
586
314
7

- beerappa September 01, 2019 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

[ 2]
[5] [8] [6]
[3] [1] [4]
[7]

- Anonymous September 01, 2019 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll cnt = 0;
int row, column;
void solve(int arr[11][11], int n, int i_previous, int j_previous){
    if(n == row*column+1 || n == row*column-3){
        for(int i = 1; i <= row; ++i){
            for(int j = 1; j <= column; ++j)
                cout << arr[i][j] << ' ';
            cout << '\n';
        }
        cout << '\n';
        ++cnt;
        return;
    }
    for(int i = 1; i <= row; ++i){
        for(int j = 1; j <= column; ++j){
            if((abs(j-j_previous) >= 2 || abs(i-i_previous) >= 2) && arr[i][j] == 0){
                arr[i][j] = n;
                //cout << "(i) : " << i << ' ' << "(j) : " << j << ' ' << arr[i][j] << endl;
                solve(arr, n+1, i, j);
                arr[i][j] = 0;
            }
        }
    }
    return;
}
int main(){
    cout << "Please Enter \"Row\" and \"Column\"" << endl;
    cout << "Row : "; cin >> row;
    cout << "Column : "; cin >> column;
    int arr[11][11] = {};
    arr[1][2] = -1, arr[1][3] = -1, arr[4][2] = -1, arr[4][2] = -1, arr[4][3] = -1;
    solve(arr, 1, -2,-2);
    cout << cnt;
    return 0;

Code in c++

- yingyang December 25, 2022 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More