Find Pair Closest to K
Asked at Meta · Coding Questions · Difficulty: Easy
Find and return a pair of integers in a sorted array (all integers are positive) that, when summed up, bring you the closest to the value of `k`.
Loading the problem…
More Meta interview questions
- LLM conceptual questions
- Implement a Two-Hidden-Layer MLP with Backpropagation in NumPy
- Dot Product with Run-Length Encoded Vectors
- Count Lakes Wrapped by a Given Island
- Minimum Remove to Make Valid Parentheses
- LLM with Beam Search and Nucleus Sampling (Meta MSL)