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–1
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