JP Morgan Chase, Online Assessments conducted on 29th October, 2022 | Ad Rotation | K-th Occurrence Queries

JP-Morgan · Question · Posted Oct 2022

Question 1 Ad Rotation <problem>175</problem> An e-commerce site has a series of advertisements to display. Links to the ads are stored in a data structure and they are displayed or not based on the value at a bit position in a number. The sequence of ads being displayed at this time can be represented as a binary value, where 1 means the ad is displayed and 0 means it is hidden. The ads should rotate, so on the next page ...

The full answer & interview discussion are available to premium members.

Log in Create a free account