We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Because as per this method the solution is an index.
The element at index 0 will always be zero, as no bird has a type 0. Accordingly for 1-5 indices 1 - 5 will be assigned and taking total number of initialized 0's to 6.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Migratory Birds
You are viewing a single comment's thread. Return to all comments →
Because as per this method the solution is an index.
The element at index 0 will always be zero, as no bird has a type 0. Accordingly for 1-5 indices 1 - 5 will be assigned and taking total number of initialized 0's to 6.