Prepin
Log in

Algorithm Interview Questions

Algorithm problems from coding interviews. Practice explaining your approach, its complexity and the edge cases before you write code.

All interview questions

Showing 10 of 112 questions

Equilibrium Tree

Medium

algorithms

Apple

If you have a string that cannot be stored in a machine's memory, divide it at every space and tally the total number of spaces.

Medium

algorithms

Service Now

Given an input string (s) and a pattern (p), create a function for wildcard pattern matching that recognizes '?' and '*' as follows: '?' corresponds to any single character. '*' corresponds to any sequence of characters, including an empty sequence. The entire input string must match the pattern, not just a portion of it.

Medium

algorithms

Amazon

Given an unsorted array of integers, identify a pair that sums up to the specified value.

Medium

algorithms

Amazon

Build a binary tree based on its preorder and inorder traversal sequences.

Medium

algorithms

Meta (Facebook)

Examine the string to determine if the parentheses are properly balanced.

Medium

algorithms

Meta (Facebook)

Calculate the dot product of two sparse vectors.

Medium

algorithms

Verify IP Address

Medium

algorithms

Determine whether two lines are parallel.

Medium

algorithms

Create a Simple Regex Parser

Medium

algorithms

Companies

Topics

Product design
Behavioral
Product strategy
Algorithms
SQL

Product

For CandidatesFor RecruitersCompaniesBrowse JobsInterview QuestionsDeep ProfileSkill AssessmentOpportunity Matching
Prepin.ai

© 2026 Prepin LLC · Philadelphia, PA · All rights reserved.