Citadel

2 DSA problems asked in Citadel coding interviews

0 Easy
2 Medium
0 Hard

2 problems

Arrays & Hashing
1
Detect Squares
Medium

You are given a stream of points on the X-Y plane. Design an algorithm that adds new points from the stream into a data structure. Duplicate points are allowed and should be treated as different points. Given a query point, counts the number of ways to choose three points from the data structure such that the three points and the query point form an axis-aligned square with positive area.

Binary Search
1
Time Based Key-Value Store
Medium

Design a time-based key-value data structure that can store multiple values for the same key at different time stamps and retrieve the key's value at a certain timestamp.