Skip to main content

Intel Coding Interview Questions

25 Intel coding interview problems with full optimal solutions — 19 easy, 6 medium, 0 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Intel interviewer values, and a FAQ section.

  • #7mediumfrequently asked

    7. Reverse Integer

    Given a signed 32-bit integer x, return x with its digits reversed. If the reversed number overflows 32-bit range, return 0. Intel asks because the entire problem is an overflow-detection puzzle in disguise — the candidate who pre-checks for overflow before multiplying is the candidate who would catch the same bug in firmware.

    3 free resourcesSolve →
  • #8mediumcompany favorite

    8. String to Integer (atoi)

    Implement atoi without using the language's parseInt. Intel loves this question because it's pure edge-case discipline — leading whitespace, optional sign, overflow clamping, non-digit termination. The rubric grades whether you handle every edge case before writing the happy-path loop.

    3 free resourcesSolve →
  • #9easyfrequently asked

    9. Palindrome Number

    Determine if an integer is a palindrome WITHOUT converting it to a string. Intel asks because the half-reverse approach (reverse only the lower half of digits and compare) is the same pure-arithmetic discipline that lets you write firmware where heap allocation isn't an option.

    3 free resourcesSolve →
  • #26easyfrequently asked

    26. Remove Duplicates from Sorted Array

    Given a sorted array, remove duplicates in-place such that each unique element appears once. Return the new length. Intel asks because the two-pointer pattern is identical to Move Zeroes but here the invariant is 'last unique value' rather than 'last non-zero' — same trick, different predicate.

    3 free resourcesSolve →
  • #50mediumcompany favorite

    50. Pow(x, n)

    Implement pow(x, n) without using the language's exponent operator. Intel asks because the optimal O(log n) fast-exponentiation algorithm is the same algorithm that ships inside modular-exponentiation hardware for RSA acceleration — and the negative-exponent and INT_MIN edge cases trip ~40% of candidates.

    3 free resourcesSolve →
  • #53mediumfrequently asked

    53. Maximum Subarray

    Given an integer array, find the contiguous subarray with the largest sum. Intel asks because Kadane's algorithm is the textbook DP entry point — the candidate who derives it from the invariant 'best ending here' before writing code is the candidate who can later derive less-famous DPs from first principles.

    4 free resourcesSolve →
  • #66easyfrequently asked

    66. Plus One

    Given an array of digits representing a large integer, increment by one and return the resulting array. Intel asks because the carry-propagation pattern is the same logic that drives big-integer addition in cryptography libraries — including the modular-arithmetic primitives Intel's IPP ships.

    3 free resourcesSolve →
  • #69easyfrequently asked

    69. Sqrt(x)

    Compute the integer square root of x without using built-in sqrt. Intel asks this because the two optimal approaches — binary search and Newton's method — both show up in fixed-point math libraries Intel ships, and the candidate who can articulate the convergence rate of Newton's method (quadratic) is the senior numerical-software signal.

    4 free resourcesSolve →
  • #70easyfrequently asked

    70. Climbing Stairs

    You can climb 1 or 2 stairs at a time; how many distinct ways to reach the top? Intel uses this as the entry point to DP discussion — the recurrence is Fibonacci-shaped and the interviewer is checking whether you spot it before you write three nested loops.

    3 free resourcesSolve →
  • #88easyfrequently asked

    88. Merge Sorted Array

    Merge two sorted arrays in-place — nums1 has trailing zero slots reserved for nums2's elements. Intel asks because the trick (merge from the back so you never overwrite an unread element) is the same pattern that lets memmove handle overlapping regions safely in libc.

    3 free resourcesSolve →
  • #121easyfrequently asked

    121. Best Time to Buy and Sell Stock

    Given a price-per-day array, find the maximum profit from a single buy-then-sell pair. Intel reaches for this in SWE-II rounds to grade whether you spot the running-minimum invariant — the same trick that powers single-pass min/max tracking in streaming sensor pipelines.

    3 free resourcesSolve →
  • #136easycompany favorite

    136. Single Number

    Every element in nums appears twice except for one, which appears once. Find it. Intel asks because the O(1)-space XOR solution requires you to recognize that XOR is its own inverse — the same algebraic property that drives parity bits, error-correcting codes, and CRC hardware Intel ships in every NIC.

    4 free resourcesSolve →
  • #141easyfrequently asked

    141. Linked List Cycle

    Detect whether a singly linked list contains a cycle. Intel reaches for Floyd's tortoise-and-hare because it's the textbook O(1)-space pointer trick; senior candidates also derive WHY two pointers at different speeds must meet inside a cycle (modular-arithmetic argument).

    3 free resourcesSolve →
  • #190easycompany favorite

    190. Reverse Bits

    Reverse the bits of a given 32-bit unsigned integer. Intel hardware-SWE loops use this to probe bit-level fluency: every candidate writes the naive shift loop, but the senior signal is the divide-and-conquer mask trick that processes 32 bits in 5 swap stages.

    4 free resourcesSolve →
  • #191easycompany favorite

    191. Number of 1 Bits

    Count the number of '1' bits in an unsigned 32-bit integer (the Hamming weight). Intel asks because the n & (n-1) trick reveals whether you've internalized bit-arithmetic identities, and because POPCNT is a real CPU instruction Intel ships — the candidate who knows the hardware path is the senior signal.

    4 free resourcesSolve →
  • #202easyfrequently asked

    202. Happy Number

    A 'happy number' converges to 1 under repeated digit-square-sum iteration. Intel asks because the optimal O(1)-space solution is Floyd's cycle detection applied to a function — not a linked list — proving you can spot the cycle-detection pattern even when the structure isn't a pointer chain.

    3 free resourcesSolve →
  • #204mediumfrequently asked

    204. Count Primes

    Count primes strictly less than n. Intel reaches for this in SWE-II rounds because the Sieve of Eratosthenes is a textbook cache-friendly algorithm — sequential memory access, branchless marking, perfect for SIMD. Naive trial-division candidates get filtered out fast.

    3 free resourcesSolve →
  • #206easyfrequently asked

    206. Reverse Linked List

    Reverse a singly linked list. Intel uses this in SWE phone screens to confirm pointer-mechanics fluency before moving on. The iterative three-pointer dance and the tail-recursive variant both come up; senior candidates write both without prompting.

    3 free resourcesSolve →
  • #231easyfrequently asked

    231. Power of Two

    Given an integer n, return true if it is a power of two. Intel interviewers ask because the one-line bit trick (n > 0 && (n & (n-1)) === 0) tests whether you've internalized the binary structure of powers of two — a property that shows up everywhere in cache-line alignment, ring buffers, and address arithmetic.

    3 free resourcesSolve →
  • #268easyfrequently asked

    268. Missing Number

    Given an array containing n distinct numbers in [0, n], return the single missing number. Intel reaches for this one because three different optimal solutions exist (XOR, Gauss sum, cyclic placement) — the interviewer is watching which one you reach for and whether you can articulate the tradeoffs.

    3 free resourcesSolve →
  • #278easyfrequently asked

    278. First Bad Version

    You have n versions [1..n] and an isBadVersion(i) API. Find the first bad one with the fewest API calls. Intel asks because this is binary search wearing a pragmatic disguise — same algorithm as LC 704, but the cost model is API-call count, which mirrors real systems work like git bisect.

    3 free resourcesSolve →
  • #283easyfrequently asked

    283. Move Zeroes

    Move all zeros to the end of the array in-place while preserving the relative order of non-zero elements. Intel asks because the two-pointer single-pass solution minimizes writes — a property that maps directly to wear-leveling in flash storage Intel ships.

    3 free resourcesSolve →
  • #287mediumcompany favorite

    287. Find the Duplicate Number

    n+1 integers in [1, n] are placed in an array. Exactly one number is repeated. Find it WITHOUT modifying the array and using O(1) extra space. Intel loves this one because the only O(1)-space algorithm requires reframing array indices as a linked list and applying Floyd's cycle detection — a real 'aha' moment that separates senior IC from mid-level.

    3 free resourcesSolve →
  • #509easyfrequently asked

    509. Fibonacci Number

    Compute the nth Fibonacci number. Intel asks because the question has FOUR escalating optimal solutions (naive recursion → memoization → iterative → matrix exponentiation), and the interviewer is grading how far up the ladder you can climb. Reaching matrix exponentiation lands the senior numerical-software signal.

    4 free resourcesSolve →
  • #704easyfoundational

    704. Binary Search

    Implement classical binary search on a sorted integer array. Intel uses this to grade whether you write the loop with `lo + (hi - lo) / 2` (overflow-safe) rather than the textbook `(lo + hi) / 2`. The 2006 JDK bug that hid in Arrays.binarySearch for nine years is the lore every senior IC has internalized.

    3 free resourcesSolve →
Intel Coding Interview Questions — Full Solutions — InterviewChamp.AI