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.
Nah, it's in the correct order as is. The formula is ran with initial value i=1, meaning it tests compares S_1 and S_0 to R_1 and R_0, then S_2 and S_1 to R_2 and R_1, etcetera.
This evaluates to the formula exactly in the explanation.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Funny String
You are viewing a single comment's thread. Return to all comments →
Nah, it's in the correct order as is. The formula is ran with initial value i=1, meaning it tests compares S_1 and S_0 to R_1 and R_0, then S_2 and S_1 to R_2 and R_1, etcetera.
This evaluates to the formula exactly in the explanation.