Mock technical interviews with an AI interviewer.
Every problem leaves something out. Ask about it before you code.
Problems
- First Lone CharacterGiven a string, return the index of the first character that appears exactly once in it.EasySets & mapsSets & maps
- Pair That Reaches the TargetGiven a list of integers and a target, find two entries that sum to the target and return their positions, smaller position first.EasySets & mapsSets & maps
- Rearranged WordsGiven two words, return true if the second can be made by rearranging the letters of the first.EasySets & mapsSets & maps
- Repeat Within K PositionsGiven a list of integers and a number k, say whether some value appears twice within k positions of each other.EasySets & mapsSets & maps
- Values in Both ListsGiven two arrays of integers, return the values that appear in both, in any order.EasySets & mapsSets & maps
- Word List Follows a PatternGiven a pattern of letters and a list of words, return true if the words follow the pattern: the i-th letter of the pattern stands for the i-th word.EasySets & mapsSets & maps
- Longest Streak of NeighborsGiven an array of integers, return the length of the longest streak of values that follow one another by exactly 1 (such as 7, 8, 9), wherever those values sit in the array.MediumSets & mapsSets & maps
- Top K Values by CountGiven a list of integers and a number k, which k values occur most often?MediumSets & mapsSets & maps
- Shortest Stretch Holding All LettersFind the shortest stretch of s holding all the letters of t, with as many copies of each letter as t has.HardSets & mapsSets & maps