Problem database last updated: June 20, 2025

HHuawei logo

Huawei Coding Interview Questions

15 problems · 3 Easy, 9 Medium, 3 Hard · Ranked #107 of 458

Difficulty breakdown

3 Easy

20% · avg 23%

9 Medium

60% · avg 59%

3 Hard

20% · avg 18%

Top topics

array
60%
string
40%
dynamic-programming
33.3%1.7x
stack
33.3%3.9x
matrix
20%2.3x
monotonic-stack
20%6.9x

Interview profile

Based on 15 reported problems, Huawei interviews are in line with industry averages - 20% Hard vs 18% overall. The majority (60%) 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, Huawei puts unusual emphasis on monotonic-stack (20% of problems, 6.9x the industry average), union-find (13.3% of problems, 4.5x the industry average), stack (33.3% of problems, 3.9x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (60%), string (40%), dynamic-programming (33.3%), stack (33.3%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 15 problems

Minimum Number of Visited Cells in a Grid

Solve

You are given a 0-indexed m x n integer matrix grid. Your initial position is at the top-left cell (0, 0).

HardVery Likely
arraydynamic-programmingstack

Maximum Binary String After Change

Solve

You are given a binary string binary consisting of only 0's or 1's. You can apply each of the following operations any number of times:

MediumVery Likely
stringgreedy

Two Sum

Solve

Given an array of integers nums and an integer target, return the indices of the two numbers that add up to target.

EasyVery Likely
arrayhash-map

Decode String

Solve

Given an encoded string, return its decoded string.

MediumVery Likely
stringstackrecursion

Valid Parentheses

Solve

Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.

EasyVery Likely
stringstack

Number of Islands

Solve

Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.

MediumVery Likely
arraydepth-first-searchbreadth-first-search

Generate Parentheses

Solve

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

MediumVery Likely
stringdynamic-programmingbacktracking

Merge Two Sorted Lists

Solve

You are given the heads of two sorted linked lists list1 and list2.

EasyLikely
linked-listrecursion

Longest Palindromic Substring

Solve

Given a string s, return the longest palindromic substring in s.

MediumLikely
two-pointersstringdynamic-programming

Combination Sum

Solve

Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum...

MediumLikely
arraybacktracking

Maximal Rectangle

Solve

Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.

HardLikely
arraydynamic-programmingstack

Daily Temperatures

Solve

Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait aft...

MediumLikely
arraystackmonotonic-stack

Largest Number

Solve

Given a list of non-negative integers nums, arrange them such that they form the largest number and return it.

MediumLikely
arraystringgreedy

Maximum Subarray

Solve

Given an integer array nums, find the subarray with the largest sum, and return its sum.

MediumLikely
arraydivide-and-conquerdynamic-programming

24 Game

Solve

You are given an integer array cards of length 4. You have four cards, each containing a number in the range [1, 9]. You should arrange the numbers on these car...

HardLikely
arraymathbacktracking

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

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your Huawei coding interview

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

Huawei has been reported to ask 15 distinct coding problems. The most common topics are array, string, dynamic-programming. 3 are Easy difficulty, 9 are Medium, and 3 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are Huawei coding interviews?add

Based on 15 reported problems, Huawei interviews are in line with industry averages - 20% Hard vs 18% overall. 60% 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 Huawei coding interview?add

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

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

Simulate a Huawei interview with AIarrow_forward