Microsoft Interview Experience for SDE (Off-Campus)

Microsoft Interview Experience for SDE (Off-Campus)I applied to Microsoft’s Off-Campus full-time SDE drive on their career website. After a week I received a link for the exam. Round 1(Online test): This round consisted of three questions for 90 mins. Basic string question based on encoding decoding.Find the length of longest sub-sequence of a given sequence such that all the elements of the sub-sequence are sorted.A dp problem (I don’t remember).Round 2 (WIT Hackathon): In this round, I was asked to pick a topic from a list, and I was asked to develop a web application based on the topic I picked. An employee from Microsoft was assigned a mentor. There was an initial doubt clearing session then a small meeting with a mentor to discuss my idea and implementation and a final meeting to demonstrate our final product. I used HTML, CSS, and python (flask) to build the application.     Round 3 (Technical Round):Tell me about yourself.Then some questions related to my projects. How to reverse a stack. (First I came up with a solution using an extra array. But, the interviewer wanted me to not use any extra space. Then I came up with a solution using two recursive functions. I was asked to implement this. Then after a short discussion about its time and space complexity interviewer asked me to come up with implementation such that it uses o(1) extra space and its time complexity is o(n) to reverse a stack. I came up with a solution using a linked list and implemented it.)Do you have any questions for me?Round 4 (Technical Round):Tell me about yourself.Then some questions related to my projects. What are deadlocks and how to prevent them?What is the difference between mutex and semaphore?Given time find the angle between the minute and hour hand.How will you implement undo and redo option using the data structure?  Do you have any questions for me?The next day HR called me and told me that I was selected 🙂