Duolingo Coding Interview Questions
25 Duolingo coding interview problems with full optimal solutions — 17 easy, 6 medium, 2 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Duolingo interviewer values, and a FAQ section.
Showing 17 problems of 25
- #242easyfoundational
242. Valid Anagram
Determine whether two strings are anagrams of each other — a pattern that mirrors how Duolingo's vocabulary engine checks if a learner rearranged the correct letters to spell a target word, making character-frequency maps the go-to tool.
- #383easyfoundational
383. Ransom Note
Check whether one string's characters can be constructed from another — the same character-budget check Duolingo's hint system runs to decide if a learner's remaining tile set can form the target phrase without reshuffling the tile pool.
- #448easyfoundational
448. Find All Numbers Disappeared in an Array
Identify which values from 1–n are absent in an array of n integers — the same gap-detection logic Duolingo's streak-repair system uses to spot which daily XP records are missing from a learner's history without a second data structure.
- #977easyfoundational
977. Squares of a Sorted Array
Return the squares of a sorted array in non-decreasing order — the kind of merge-from-ends two-pointer move that underpins Duolingo's leaderboard re-ranking, where positive and negative score deltas must be combined into a single sorted result efficiently.
- #1easyfoundational
1. Two Sum
Given an array of integers and a target, return indices of two numbers that sum to target.
- #2easyfoundational
2. Valid Parentheses
Determine if an input string of brackets is correctly opened and closed.
- #3easyfoundational
3. Merge Two Sorted Lists
Merge two sorted linked lists into one sorted list.
- #4easyfoundational
4. Remove Duplicates from Sorted Array
Remove duplicates from a sorted array in-place and return the new length.
- #5easyfoundational
5. Remove Element
Remove all occurrences of a value from an array in-place.
- #6easyfoundational
6. Search Insert Position
Find the index where target appears or should be inserted to keep the array sorted.
- #7easyfoundational
7. Maximum Subarray
Find the contiguous subarray with the largest sum.
- #8easyfoundational
8. Plus One
Add one to a non-negative integer represented as an array of digits.
- #9easyfoundational
9. Merge Sorted Array
Merge two sorted integer arrays into nums1 in-place.
- #10easyfoundational
10. Binary Tree Inorder Traversal
Return the inorder traversal of a binary tree's node values.
- #11easyfoundational
11. Same Tree
Check whether two binary trees have identical structure and values.
- #12easyfoundational
12. Symmetric Tree
Determine if a binary tree is a mirror of itself around its center.
- #13easyfoundational
13. Maximum Depth of Binary Tree
Return the depth of the deepest leaf in a binary tree.