Problem database last updated: June 20, 2025

TTuring logo

Turing Coding Interview Questions

41 problems · 11 Easy, 28 Medium, 2 Hard · Ranked #51 of 458

Difficulty breakdown

11 Easy

27% · avg 23%

28 Medium

68% · avg 59%

2 Hard

5% · avg 18%

Top topics

array
58.5%
string
39%
hash-table
26.8%
dynamic-programming
26.8%
sorting
12.2%
two-pointers
12.2%

Interview profile

Based on 41 reported problems, Turing interviews are easier than average - only 5% Hard compared to 18% across all companies. The majority (68%) 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, Turing puts unusual emphasis on counting (7.3% of problems, 2.2x the industry average), sliding-window (9.8% of problems, 2.1x the industry average), union-find (4.9% of problems, 1.7x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (58.5%), string (39%), hash-table (26.8%), dynamic-programming (26.8%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 41 problems

Valid Parentheses

Solve

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

EasyVery Likely
stringstack

Longest Substring Without Repeating Characters

Solve

Given a string s, find the length of the longest substring without duplicate characters.

MediumVery Likely
hash-tablestringsliding-window

Baseball Game

Solve

You are keeping the scores for a baseball game with strange rules. At the beginning of the game, you start with an empty record.

EasyVery Likely
arraystacksimulation

Minimum Cost For Tickets

Solve

You have planned some train traveling one year in advance. The days of the year in which you will travel are given as an integer array days. Each day is an inte...

MediumLikely
arraydynamic-programming

Koko Eating Bananas

Solve

Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours.

MediumLikely
arraybinary-search

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.

MediumLikely
arraydepth-first-searchbreadth-first-search

Longest Common Prefix

Solve

Write a function to find the longest common prefix string amongst an array of strings.

EasyLikely
arraystringtrie

Validate IP Address

Solve

Given a string queryIP, return "IPv4" if IP is a valid IPv4 address, "IPv6" if IP is a valid IPv6 address or "Neither" if IP is not a correct IP of any type.

MediumLikely
string

Find the Town Judge

Solve

In a town, there are n people labeled from 1 to n. There is a rumor that one of these people is secretly the town judge.

EasyLikely
arrayhash-tablegraph

Minimum Length of Anagram Concatenation

Solve

You are given a string s, which is known to be a concatenation of anagrams of some string t.

MediumLikely
hash-tablestringcounting

Merge Intervals

Solve

Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cove...

MediumLikely
arraysorting

Maximum Subarray

Solve

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

MediumLikely
arraydivide-and-conquerdynamic-programming

Apply Operations to Make Sum of Array Greater Than or Equal to k

Solve

You are given a positive integer k. Initially, you have an array nums = [1].

MediumLikely
mathgreedyenumeration

Climbing Stairs

Solve

You are climbing a staircase. It takes n steps to reach the top.

EasyLikely
mathdynamic-programmingmemoization

Find Duplicate File in System

Solve

Given a list paths of directory info, including the directory path, and all the files with contents in this directory, return all the duplicate files in the fil...

MediumLikely
arrayhash-tablestring

House Robber

Solve

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from rob...

MediumLikely
arraydynamic-programming

Product of Array Except Self

Solve

Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i].

MediumLikely
arrayprefix-sum

Degree of an Array

Solve

Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements.

EasyLikely
arrayhash-table

Partition Array Into Three Parts With Equal Sum

Solve

Given an array of integers arr, return true if we can partition the array into three non-empty parts with equal sums.

EasyLikely
arraygreedy

Maximum Number of Vowels in a Substring of Given Length

Solve

Given a string s and an integer k, return the maximum number of vowel letters in any substring of s with length k.

MediumLikely
stringsliding-window

Regular Expression Matching

Solve

Given an input string s and a pattern p, implement regular expression matching with support for '.' and '' where:

HardLikely
stringdynamic-programmingrecursion

Longest Consecutive Sequence

Solve

Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence.

MediumLikely
arrayhash-tableunion-find

Find All Anagrams in a String

Solve

Given two strings s and p, return an array of all the start indices of p's anagrams in s. You may return the answer in any order.

MediumSometimes
hash-tablestringsliding-window

Kth Largest Element in an Array

Solve

Given an integer array nums and an integer k, return the kth largest element in the array.

MediumSometimes
arraydivide-and-conquersorting

3Sum

Solve

Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.

MediumSometimes
arraytwo-pointerssorting

Best Time to Buy and Sell Stock

Solve

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

EasySometimes
arraydynamic-programming

Longest Palindromic Substring

Solve

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

MediumSometimes
two-pointersstringdynamic-programming

Find First and Last Position of Element in Sorted Array

Solve

Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value.

MediumSometimes
arraybinary-search

Valid Palindrome

Solve

A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forwa...

EasySometimes
two-pointersstring

Group Anagrams

Solve

Given an array of strings strs, group the anagrams together. You can return the answer in any order.

MediumSometimes
arrayhash-tablestring

Jump Game

Solve

You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length...

MediumSometimes
arraydynamic-programminggreedy

Race Car

Solve

Your car starts at position 0 and speed +1 on an infinite number line. Your car can go into negative positions. Your car drives automatically according to a seq...

HardSometimes
dynamic-programming

Maximum Repeating Substring

Solve

For a string sequence, a string word is k-repeating if word concatenated k times is a substring of sequence. The word's maximum k-repeating value is the highest...

EasySometimes
stringdynamic-programmingstring-matching

Spiral Matrix

Solve

Given an m x n matrix, return all elements of the matrix in spiral order.

MediumSometimes
arraymatrixsimulation

Longest Repeating Character Replacement

Solve

You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can perform th...

MediumSometimes
hash-tablestringsliding-window

Consecutive Numbers

Solve

Table: Logs

MediumSometimes
database

Reverse Only Letters

Solve

Given a string s, reverse the string according to the following rules:

EasySometimes
two-pointersstring

Sum of Digit Differences of All Pairs

Solve

You are given an array nums consisting of positive integers where all integers have the same number of digits.

MediumSometimes
arrayhash-tablemath

Minimum Number of Operations to Make Word K-Periodic

Solve

You are given a string word of size n, and an integer k such that k divides n.

MediumSometimes
hash-tablestringcounting

Number of Subsequences That Satisfy the Given Sum Condition

Solve

You are given an array of integers nums and an integer target.

MediumSometimes
arraytwo-pointersbinary-search

Minimum Number of Operations to Satisfy Conditions

Solve

You are given a 2D matrix grid of size m x n. In one operation, you can change the value of any cell to any non-negative number. You need to perform some operat...

MediumSometimes
arraydynamic-programmingmatrix

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

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your Turing coding interview

Turing 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. Turing 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 Turing ask in interviews?add

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

How hard are Turing coding interviews?add

Based on 41 reported problems, Turing interviews are easier than average - only 5% Hard compared to 18% across all companies. 68% 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 Turing 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 Turing interview?

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

Simulate a Turing interview with AIarrow_forward