Problem database last updated: June 20, 2025

GGeico logo

Geico Coding Interview Questions

17 problems · 2 Easy, 13 Medium, 2 Hard · Ranked #103 of 458

Difficulty breakdown

2 Easy

12% · avg 23%

13 Medium

76% · avg 59%

2 Hard

12% · avg 18%

Top topics

array
52.9%
string
47.1%1.7x
hash-table
35.3%1.6x
greedy
29.4%3.5x
dynamic-programming
29.4%1.5x
bit-manipulation
17.6%5.2x

Interview profile

Based on 17 reported problems, Geico interviews are in line with industry averages - 12% Hard vs 18% overall. The majority (76%) of questions are Medium difficulty, which is typical for companies that want to see solid fundamentals without excessive trick questions.

Compared to the industry average, Geico puts unusual emphasis on bit-manipulation (17.6% of problems, 5.2x the industry average), greedy (29.4% of problems, 3.5x the industry average), backtracking (11.8% of problems, 2.3x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (52.9%), string (47.1%), hash-table (35.3%), greedy (29.4%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 17 problems

Largest Palindromic Number

Solve

You are given a string num consisting of digits only.

MediumVery Likely
hash-tablestringgreedy

Number of Steps to Reduce a Number in Binary Representation to One

Solve

Given the binary representation of an integer as a string s, return the number of steps to reduce it to 1 under the following rules:

MediumVery Likely
stringbit-manipulationsimulation

Integer to Roman

Solve

Seven different symbols represent Roman numerals with the following values:

MediumVery Likely
hash-tablemathstring

Valid Sudoku

Solve

Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:

MediumVery Likely
arrayhash-tablematrix

Coin Change

Solve

You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money.

MediumVery Likely
arraydynamic-programmingbreadth-first-search

Best Time to Buy and Sell Stock with Cooldown

Solve

You are given an array prices where prices[i] is the price of a given stock on the ith day.

MediumVery Likely
arraydynamic-programming

First Missing Positive

Solve

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

HardVery Likely
arrayhash-table

Minimum Number of Food Buckets to Feed the Hamsters

Solve

You are given a 0-indexed string hamsters where hamsters[i] is either:

MediumLikely
stringdynamic-programminggreedy

Longest Happy String

Solve

A string s is called happy if it satisfies the following conditions:

MediumLikely
stringgreedyheap-priority-queue

Path with Maximum Gold

Solve

In a gold mine grid of size m x n, each cell in this mine has an integer representing the amount of gold in that cell, 0 if it is empty.

MediumLikely
arraybacktrackingmatrix

Remove All Adjacent Duplicates In String

Solve

You are given a string s consisting of lowercase English letters. A duplicate removal consists of choosing two adjacent and equal letters and removing them.

EasyLikely
stringstack

Decode String

Solve

Given an encoded string, return its decoded string.

MediumLikely
stringstackrecursion

Best Time to Buy and Sell Stock II

Solve

You are given an integer array prices where prices[i] is the price of a given stock on the ith day.

MediumLikely
arraydynamic-programminggreedy

Count of Smaller Numbers After Self

Solve

Given an integer array nums, return an integer array counts where counts[i] is the number of smaller elements to the right of nums[i].

HardLikely
arraybinary-searchdivide-and-conquer

Minimum Moves to Spread Stones Over Grid

Solve

You are given a 0-indexed 2D integer matrix grid of size 3 3, representing the number of stones in each cell. The grid contains exactly 9 stones, and there can...

MediumLikely
arraydynamic-programmingbacktracking

Cinema Seat Allocation

Solve

A cinema has n rows of seats, numbered from 1 to n and there are ten seats in each row, labelled from 1 to 10 as shown in the figure above.

MediumLikely
arrayhash-tablegreedy

Roman to Integer

Solve

Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.

EasyLikely
hash-tablemathstring

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 Geico interviews.

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your Geico coding interview

Geico interviews focus heavily on array, string, hash-table 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. Geico 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 Geico ask in interviews?add

Geico has been reported to ask 17 distinct coding problems. The most common topics are array, string, hash-table. 2 are Easy difficulty, 13 are Medium, and 2 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are Geico coding interviews?add

Based on 17 reported problems, Geico interviews are in line with industry averages - 12% Hard vs 18% overall. 76% 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 Geico coding interview?add

Start with the highest-frequency problems listed on this page. Focus on the core topics: array, string, hash-table. 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 Geico interview?

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

Simulate a Geico interview with AIarrow_forward