Leetcode: A bitmask problem

6029. Maximum Points in an Archery Competition

Problem statement:

Alice and Bob are opponents in an archery competition. The competition has set the following rules:

  1. Alice first shoots numArrows arrows and then Bob shoots numArrows arrows.
  2. The points are then calculated as follows:
  • The target has integer scoring sections ranging from 0 to 11 inclusive.
  • For each section of the target with score k (in between 0 to 11), say…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store