Being rejected though I correctly solving the problems
The statement "someone else performed better and was hired" is not true of Microsoft (and probably other big companies). If they think you should be hired, you will get an offer and does not depend on their interviewing a better candidate the next day.
Though Miguel's right that you will never know for certain, a good way to get at least some more insight is to let us know the questions you were asked and what answers you gave, if possible. That way we could at least talk about whether your answers were as good as you think they were.
Gayle talks about this quite a bit. The companies will never tell you why they rejected you.
- Miguel Oliveira October 14, 2013The most likely reason is that someone else performed better and was hired instead. The visa issue and the lack of experience with the Microsoft stack can affect this. It depends on the other points of comparison between candidates.
- You never know how well you did in the interview. Interviewers being really friendly or gloomy does not mean much.
- Even if you gave correct answers, there may be better answers (or answers that the company prefer)
- The company may be looking more into how the candidate thinks rather than the right answers.
- Cultural fit matters a lot
I've seen a true genius (medals in international scientific olympiads, really high ratings in programming competitions, etc) post on his facebook page that he was rejected at a few large companies and start-ups, but eventually got a job at one of the most popular big companies.
IQ is not enough. This is highly subjective.