Top 50 comparison Interview Questions
The most frequently asked comparison questions across all roles and companies, ranked by real interview frequency. Updated daily.
Use character frequency counting to determine whether two PlayStation strings are permutations in linear time.
PlayStation
PoshmarkDetermine whether two binary trees have identical structure and values using recursive tree traversal.
UST
HopperFind the second-largest value among three integers using constant extra space and a single comparison pass.
Quest GlobalDetermine the greatest of three sensor readings using constant-space comparisons.
TATA ELXSIParse two JSON objects and return sorted keys whose values differ or whose key exists in only one object.
IBMCompare nested JSON objects and return sorted JSON Pointer paths whose values differ.
IBMUse a single pass to compare counts of values above and below a target threshold.
Capital OneUse two pointers to find the one additional character in a sorted string in O(n) time and O(1) space.
BloombergSign up to see every question
Create a free account to unlock this list and practice real interview questions.
Compare normalized character signatures to determine whether each pair of strings is an anagram.
AdobeCalculate the sum of integers from 1 to 1,000,000 using PostgreSQL aggregation and filtering.
Virtu FinancialCount a target character case-insensitively in a Discord message using PostgreSQL string functions.
Discord