Interview questions
Find a company or topic. Read the sources, then practice.
Loading the question library…
Find a company or topic. Read the sources, then practice.
Loading the question library…
Showing 1–2
Given two strings, return the starting index of the first occurrence of needle in haystack, or -1 if absent. This is a classic substring search…
Companies: Bloomberg, Google, Meta, Microsoft
Boyer–Moore String-Search Algorithm · Knuth–Morris–Pratt Algorithm · String · String Matching
Check whether one string is a rotation of another: return true iff s and goal have the same length and goal can be obtained by…
Companies: Roblox
String · String Matching