# Microsoft IDC Internship Experience | On-Campus 2021

• Difficulty Level : Hard
• Last Updated : 17 Aug, 2021

Microsoft was the very first company to visit our campus. All CS, IT, ETC students with 7.5CGPA till 4th sem with no current backlogs were eligible for the profile.

Round 1(Online Coding Test): The first round was comprised of 2 coding questions, held on the Codility platform, total time given 90mins.

Hey geek! It's time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And if you are looking for a more complete interview preparation resource, check out Complete Interview Preparation Course that will prepare you for the SDE role of your dreams!

Feeling prepared enough for your interview? Test your skills with our Test Series that will help you prepare for top companies like Amazon, Microsoft, TCS, Wipro, Google and many more!

1. The main idea of the question was, In an array, some outcomes of dice rolls will be given and some outcomes are not there. A Mean value was given for all the outcomes ( including which are not in the given array) and the number of outcomes not present in that array is also given. So we had to find out any combination for those missing outcomes of dice such that all the above condition satisfies properly. If no such combination is possible, just return an empty array.

Example

```arr = [ 1, 2, 3, 3 ],  Mean = 2,
Number not present in array = 2
so a possible combination of outcomes
not present in the array may be [ 2, 1 ]```
2. There was a story around the question but the main idea was a string was given consisting of 3 characters only, “a”, “b”, and “?”. We had to replace the “?” with either “a” or “b” such that no 3 contiguous characters become the same, i.e there won’t be any substring “aaa” or “bbb”.

Total 38 students were shortlisted in this round.

Round 2(Technical Interview): It was a technical interview, I had a very friendly interaction with the interviewer. After a few word exchange, he asked my what is my favorite data structure, I told him I am familiar with all the data structures. Then he gave me a question on string.

1. The main idea was we have to decrypt a string, like 2(a)3(b) will be written as “aabbb”, 1(a)2(1(c)2(d)) will be written as “acddcdd”. He first asked me to explain the logic on Notepad, I explained my logic with Stack, he was pretty happy with the logic and told me to code it.

It was a one hour interview and at the end, he asked my if I had any question for him.

I was selected for subsequent rounds of interviews.

Round 3 (Technical Interview): It was also a technical round, I was given two questions.

• In this question, There was a given text and a given pattern. I had to find all the indexes (starting index of the substring) where any substring of the text is the anagram of the pattern. It was a sliding window problem and initially, I gave my brute force solution, later he asked me to optimize it, although I could not do it very well because I became a bit nervous at that moment. He realized that and gave me another question.
• In a file system, 1 billion lines were written, I had to find out the K most repeating lines in that file. I gave my solution with hashmaps and heap data structure, he was pretty impressed with that solution and asked me if I could find any edge cases there.

It was also a one-hour interview and I got selected for the next HR round.

Round 4(Technical + HR Interview): The interview started with a very common question, “Tell me about yourself”. Then he asked me about my college, my hobbies, and my projects.

• I had 4 projects on my resume and he asked me to explain anyone. I explained one of my projects with all the details like what I’ve learned from the project, what were the difficulties that I faced. He was impressed with that and moved to a technical question.
• The main idea was about building a child game, where a kid will input randoms characters and we have to say if it is possible to generate any valid word by rearranging those letters in the input. A valid word list was also given. I told my solution with sorting and hashmaps. He was impressed with the solution, and further modified the problem and asked me to check for all the subsequence of the input also. I was approaching with brute force and asked me to optimize it. I couldn’t do that very well at that moment and after a few discussions, the interview was ended.

After 4-5 Hours, results were declared.

Verdict: SELECTED