Questions / Amazon

Count Zeros in a Sorted Binary Array

Asked at Amazon · Coding Questions · Difficulty: Easy

Given a sorted array of 0s followed by 1s, return the number of 0s in `O(log n)`.

Loading the problem…

More Amazon interview questions

  • LLM conceptual questions
  • Compare PPO, DPO, and GRPO
  • Morse Code Decoder
  • Design a Lab-Wide Experiment Platform for Embodied AI
  • Debugging a Seeded-Bug Repository with an AI Assistant
  • RLHF: PPO vs GRPO vs GSPO
All Amazon questions