Katkat

Design Algorithm for Longest Increasing Subsequence Length

ExperianData Scientist · Technical Screen

Last updated

This question evaluates algorithm design and data structure skills, covering subsequence analysis, constraint/graph modeling for seating, and external-memory sorting considerations for scalability.

Scenario

Programming assessment and infrastructure panel

Question

Design an algorithm to return the length of the Longest Increasing Subsequence of an array.

Seat students so that no two listed friends sit next to each other; provide algorithm and complexity.

How would you sort a file containing 50 numbers? How would your approach change for a 1-million-number file stored on disk?

Hints

Use O(n log n) patience sorting + binary search; graph/constraint satisfaction; external merge-sort for large files.