Reverse Elements in Array
Asked at Meta · Coding Questions · Difficulty: Easy
Given an integer array `array` and two indices `i` and `j`, reverse the elements between `i` and `j`. Be sure to handle edge cases such as `i` being greater than `j`, `array` being `null`, and `i` and `j` out of boundaries.
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)