Questions / Amazon

Count Pairs With Sum Divisible by X

Asked at Amazon · Coding Questions · Difficulty: Easy

Count the pairs of indices `i < j` whose price sum `prices[i] + prices[j]` is divisible by `x`.

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