Tag view

#set

Cross-subject tag search for related interview cards.

Clear

Results update as you type. Press / to jump straight into search.

Tagged with set

3 cards

Coding Exercises Easy O(n + m)

Intersection of Two Arrays

Convert both arrays to sets, intersect them, and sort the result if you want deterministic output for testing or interviews.

Return the unique values that appear in both arrays.

Coding Exercises Medium O(n)

Longest Consecutive Sequence

Put all numbers in a set, then expand sequences only from values whose previous number is absent. That avoids re-counting the same streak multiple times.

Return the length of the longest consecutive sequence in an unsorted array.