Maximum Number of Moves with Same Result
Asked at Microsoft · Coding Questions · Difficulty: Medium
You are given an array A consisting of N numbers. In one move you can delete either the first two, the last two, or the first and last elements of A. No move can be performed if the length of A is smaller than 2. The result of each move is the sum of the deleted elements.
Loading the problem…
More Microsoft interview questions
- LLM conceptual questions
- Roofline Analysis and Mixed-Precision Gradients for Matmul
- Tiny Next-Token Prediction Model (PyTorch Fill-In)
- Design Search Autocomplete / Typeahead
- Design a Chatbot Personalization / Memory System
- Design a Job Scheduler / ETL Pipeline