Skip to main content
Back to Companies
Microsoft logo

Microsoft Interview Questions (1386)

Practice real interview problems from Microsoft

#485

Max Consecutive Ones

Easyâś“ Solution
Accenture+13
#496

Next Greater Element I

Easy✓ Solution📹 Video
Accenture+16
#504

Base 7

Easyâś“ Solution
Amazon+3
#507

Perfect Number

Easyâś“ Solution
Accenture+7
#511

Game Play Analysis I

Easy✓ Solution📹 Video
Amazon+5
#520

Detect Capital

Easy✓ Solution📹 Video
Bloomberg+3
#541

Reverse String II

Easy✓ Solution📹 Video
Accenture+6
#557

Reverse Words in a String III

Easy✓ Solution📹 Video
Amazon+6
#577

Employee Bonus

Easy✓ Solution📹 Video
Amazon+6
#584

Find Customer Referee

Easy✓ Solution📹 Video
Amazon+6
#595

Big Countries

Easy✓ Solution📹 Video
Amazon+4
#596

Classes More Than 5 Students

Easy✓ Solution📹 Video
Bloomberg+2
#605

Can Place Flowers

Easy✓ Solution📹 Video
Airbnb+15
#610

Triangle Judgement

Easy✓ Solution📹 Video
Amazon+4
#620

Not Boring Movies

Easy✓ Solution📹 Video
Amazon+4
#627

Swap Salary

Easy✓ Solution📹 Video
Amazon+4
#645

Set Mismatch

Easy✓ Solution📹 Video
Amazon+6
#657

Robot Return to Origin

Easy✓ Solution📹 Video
Amazon+4
#661

Image Smoother

Easyâś“ Solution
Amazon+5
#682

Baseball Game

Easy✓ Solution📹 Video
Amazon+5
#696

Count Binary Substrings

Easy✓ Solution📹 Video
Amazon+17
#697

Degree of an Array

Easy✓ Solution📹 Video
Amazon+11
#704

Binary Search

Easy✓ Solution📹 Video
Amazon+10
#706

Design HashMap

Easy✓ Solution📹 Video
Amazon+12
#709

To Lower Case

Easy✓ Solution📹 Video
Google+2
#724

Find Pivot Index

Easyâś“ Solution
Accenture+17
#728

Self Dividing Numbers

Easyâś“ Solution
Amazon+4
#747

Largest Number At Least Twice of Others

Easy✓ Solution📹 Video
Bloomberg+3
#771

Jewels and Stones

Easy✓ Solution📹 Video
Amazon+5
#796

Rotate String

Easy✓ Solution📹 Video
Accenture+11
Page 3 of 8

About Microsoft Coding Interviews

Microsoft’s engineering interviews focus on practical problem solving, clean code, and strong data structure fundamentals. Whether you are applying for Software Engineer, SDE II, or internship roles, the company looks for candidates who can break down real-world problems and implement efficient solutions. Microsoft interviews typically combine coding, system design (for experienced roles), and behavioral evaluation aligned with the company’s growth mindset culture.

The coding portion of a Microsoft coding interview usually tests your understanding of core data structures and algorithms. Candidates are expected to write production-quality code, discuss trade-offs, and clearly explain their approach. Interviewers also value collaboration — they often treat the session like a problem-solving discussion rather than a silent coding test.

Across real Microsoft interviews, the most common DSA topics include:

  • Arrays and strings problem solving
  • Hash maps and hash sets
  • Binary trees and binary search trees
  • Graph traversal (BFS and DFS)
  • Dynamic programming and recursion
  • Sliding window and two-pointer techniques

Difficulty typically spans a mix of easy and medium questions, with occasional hard problems for experienced roles. Strong emphasis is placed on writing optimized solutions and explaining time and space complexity.

FleetCode helps you prepare using 1352 real Microsoft interview questions collected from past candidate experiences. Problems are organized by difficulty and topic, allowing you to focus on the patterns Microsoft frequently asks. With solutions available in Python, Java, and C++, you can practice like a real interview and systematically build the skills needed to succeed in Microsoft’s technical interviews.

Interview Tips for Microsoft

Preparing for a Microsoft coding interview requires more than memorizing solutions. Microsoft evaluates how clearly you think, communicate, and improve a solution step by step.

Typical Microsoft interview format:

  • Recruiter screen: A short conversation about your background and role fit.
  • Technical phone screen: Usually one coding problem focused on data structures or algorithms.
  • Onsite or virtual loop (4–5 rounds): Multiple coding interviews, one behavioral interview, and sometimes a system design round for experienced candidates.
  • Bar raiser / hiring manager discussion: Evaluates collaboration, problem solving approach, and culture fit.

Most Microsoft coding rounds last 45–60 minutes. You are expected to clarify requirements, discuss edge cases, write working code, and optimize it if possible.

Common problem categories asked at Microsoft include:

  • Arrays and string manipulation
  • Binary trees and tree traversal
  • Hash table based lookups
  • Graph problems using BFS or DFS
  • Dynamic programming for optimization problems
  • Intervals, heaps, and sliding window patterns

Preparation strategy that works well for Microsoft:

  • Master core DSA patterns instead of memorizing individual questions.
  • Practice explaining your thought process out loud while coding.
  • Focus on writing clean, readable code rather than extremely short solutions.
  • Review time and space complexity for every solution.

Common mistakes candidates make:

  • Jumping straight into coding without clarifying the problem.
  • Ignoring edge cases such as empty inputs or duplicates.
  • Not testing their solution with sample inputs.
  • Overcomplicating problems that have simpler approaches.

For most candidates, 8–12 weeks of consistent practice solving Microsoft-style problems is enough to build confidence. Practicing the 1352 Microsoft interview questions on FleetCode will help you recognize common patterns and significantly improve your chances of clearing the coding rounds.