9. After the holidays lots of people were rushing to move back to their apartments. In this scenario, even numbers will represent women while odd numbers will represent men. Store the sequence of entry into the building by typing in even and odd numbers into an array at random. Calculate the largest sequence of women entering the building before a man enters. (The largest continuous number of women that entered before a man came in) Example: 17, 4, 6, 8, 9, 2, 8, 49 (The largest continuous number of women is 3).
Fri Aug 18 2023 19:34:41 GMT+0000 (Coordinated Universal Time)
Saved by @Codes
Comments