Tekion interview prep

Practice 30 problems from community-reported Tekion interviews.

Start practicing Count the Number of Infection Sequences

Ranked problems

30 problems
Tekion interview prep, ordered by rank
ProblemDifficultyCompany lists
Counting

Children stand in a line with some initially infected. Count the orders in which the others can become infected, one adjacent child at a time.

On the Tekion list.

Hard
Two pointers

Given a row of unit-width bars of different heights, calculate how much rainwater settles between them.

On the Amazon, Google, Microsoft, Meta, Samsung, Tekion lists.

Hard
Dynamic programming

Given daily stock prices, find the best total profit from at most two buy-and-sell trades. Sell your current share before buying again.

On the Tekion list.

Hard
Dynamic programming

Find the largest sum you can make by taking a nonempty, contiguous part of an array.

On the Amazon, Google, Microsoft, Meta, Tekion, Oracle lists.

Medium
Binary search

Divide an array of nonnegative numbers into exactly k nonempty contiguous parts. Minimize the largest part sum.

On the Google, Tekion lists.

Hard
Hash tables

Find the indices of two different elements in an array whose values add up to a given target.

On the Amazon, Google, Microsoft, Meta, Samsung, Tekion, IBM, Oracle, J.P. Morgan, Morgan Stanley lists.

Try [2, 7, 11, 15] with a target of 9.

Reveal the indices

[0, 1] points to 2 and 7.

Easy
Breadth-first search

Rot spreads to adjacent fresh oranges each minute. Find when every orange is rotten, or report that some cannot be reached.

On the Amazon, Tekion lists.

Medium
Dynamic programming

Build the longest chain of dictionary words in which each new word inserts exactly one letter into its predecessor.

On the Tekion list.

Medium
Backtracking

Generate the n-digit numbers without leading zeros in which every adjacent pair of digits differs by exactly k.

On the Tekion list.

Medium
Sliding window

Find the longest stretch of ones you can obtain in a binary array by flipping at most k zeros.

On the Meta, Tekion lists.

Medium
Prefix sums

Count the splits into three nonempty consecutive parts whose sums are in nondecreasing order from left to right.

On the Tekion list.

Medium
Intervals · LeetCode Premium

Given meeting start and end times, find the fewest rooms needed so every meeting can run on schedule.

On the Tekion, Oracle, J.P. Morgan lists.

Medium
Data structure design

Maintain a stream of integers and answer queries for the product of the most recent k entries, including streams containing zeros.

On the Tekion list.

Medium
Breadth-first search

Find the length of the shortest chain from the start word to the target, changing one letter at a time and using a dictionary word at each step.

On the Tekion list.

Hard
Stacks

For each daily temperature, report how many days you must wait for a warmer reading. Use zero if none follows.

On the Tekion, Morgan Stanley lists.

Medium
Sliding window

Count the contiguous segments of a positive-integer array whose product is strictly below k.

On the Samsung, Tekion lists.

Medium
Counting

Rank teams by first-place votes, then second-place votes and subsequent positions. Break any remaining ties alphabetically.

On the Tekion list.

Medium
Two pointers

Find the length of the shortest contiguous segment you can remove so the remaining values are in nondecreasing order.

On the Tekion list.

Medium
Sliding window

Find the length of the longest contiguous stretch of a string in which no character appears twice.

On the Amazon, Google, Microsoft, Meta, Tekion, IBM, Oracle, J.P. Morgan, Morgan Stanley lists.

Medium
Heaps

Support inserting numbers into a stream and retrieving the median of all numbers seen so far.

On the Tekion, Oracle lists.

Hard
Greedy

Repeatedly remove a nonempty prefix and record its smallest missing nonnegative integer. Choose the prefixes that produce the lexicographically largest sequence.

On the Tekion list.

Hard
Strings

Return the longest contiguous part of a string that reads the same forward and backward.

On the Amazon, Google, Microsoft, Meta, Tekion, IBM, Oracle, J.P. Morgan lists.

Medium
Prefix sums

After at most one swap anywhere in a binary string, find the longest substring containing equal numbers of zeros and ones.

On the Tekion list.

Medium
Backtracking

List the strings a sequence of digits from 2 to 9 could spell using a telephone keypad.

On the Microsoft, Tekion lists.

Medium
Trees

Connect two trees with a single edge and find the smallest possible diameter of the resulting tree.

On the Tekion list.

Hard
Greedy

Choose a starting station that lets a car complete a circular route with an initially empty tank, or return −1 if the trip is impossible.

On the Tekion list.

Medium
Dynamic programming

Select as many positive integers as possible such that one number in every selected pair divides the other.

On the Tekion list.

Medium
Binary search

Consider the absolute difference for every pair of positions. Return the kth smallest difference, counting ties separately.

On the Tekion list.

Hard
Graph traversal

Remove a stone only when another remaining stone shares its row or column. Find the most stones you can remove.

On the Tekion list.

Medium
Binary search

Find the first and last indices of a target in a sorted array in logarithmic time, returning −1 for both if it is absent.

On the Tekion list.

Medium
How are questions ranked?

Company lists follow community-reported interview frequency. Ties keep the source order. Where a list uses two sources, we keep the first list’s ranks and fill the remaining places with the highest-ranked distinct problems from the second.

Across companies, first place earns 30 points and each subsequent rank earns one fewer. We add each problem’s points and break ties alphabetically.