Loading...
Engaged Employer
I was asked how to print every nth element from an array.
Anonymous
Take the mod of the number. For an array, iterate over it begining with i=0, and where ever i%number == 0 print array[i].
Check out your Company Bowl for anonymous work chats.
Get actionable career advice tailored to you by joining more bowls.
Stay ahead in opportunities and insider tips by following your dream companies.
Get personalized job recommendations and updates by starting your searches.