Problem database last updated: June 20, 2025

GGeneral Motors logo

General Motors Coding Interview Questions

6 problems · 2 Easy, 3 Medium, 1 Hard · Ranked #223 of 458

Difficulty breakdown

2 Easy

33% · avg 23%

3 Medium

50% · avg 59%

1 Hard

17% · avg 18%

Top topics

array
66.7%
hash-table
33.3%1.5x
dynamic-programming
16.7%
matrix
16.7%1.9x
linked-list
16.7%2.3x
design
16.7%2.9x

Interview profile

Based on 6 reported problems, General Motors interviews are in line with industry averages - 17% Hard vs 18% overall.

Compared to the industry average, General Motors puts unusual emphasis on hash-table (33.3% of problems, 1.5x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (66.7%), hash-table (33.3%), dynamic-programming (16.7%), matrix (16.7%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 6 problems

First Missing Positive

Solve

Given an unsorted integer array nums. Return the smallest positive integer that is not present in nums.

HardLikely
arrayhash-table

Minimum Path Sum

Solve

Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path.

MediumLikely
arraydynamic-programmingmatrix

LRU Cache

Solve

Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.

MediumLikely
hash-tablelinked-listdesign

The Number of Full Rounds You Have Played

Solve

You are participating in an online chess tournament. There is a chess round that starts every 15 minutes. The first round of the day starts at 00:00, and after...

MediumLikely
mathstring

Last Visited Integers

Solve

Given an integer array nums where nums[i] is either a positive integer or -1. We need to find for each -1 the respective positive integer, which we call the las...

EasyLikely
arraysimulation

Widest Vertical Area Between Two Points Containing No Points

Solve

Given n points on a 2D plane where points[i] = [xi, yi], Return the widest vertical area between two points such that no points are inside the area.

EasyLikely
arraysorting

How often are these problems asked?

Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent General Motors interviews.

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your General Motors coding interview

General Motors interviews focus heavily on array, hash-table, dynamic-programming problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.

Beyond solving problems, practice explaining your approach. General Motors interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.

Looking for more companies? Browse all 458 companies in our directory, or sharpen your fundamentals with our free data structure visualizers and AI-powered DSA tutor.

Frequently Asked Questions

What coding problems does General Motors ask in interviews?add

General Motors has been reported to ask 6 distinct coding problems. The most common topics are array, hash-table, dynamic-programming. 2 are Easy difficulty, 3 are Medium, and 1 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are General Motors coding interviews?add

Based on 6 reported problems, General Motors interviews are in line with industry averages - 17% Hard vs 18% overall. 50% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.

How should I prepare for a General Motors coding interview?add

Start with the highest-frequency problems listed on this page. Focus on the core topics: array, hash-table, dynamic-programming. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.

Other companies to explore

Ready to ace your General Motors interview?

Simulate a real General Motors coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.

Simulate a General Motors interview with AIarrow_forward