Блог пользователя prcsamrat

Автор prcsamrat, история, 9 месяцев назад, По-английски

Hello, I am trying to solve the Josephus Queries (Mathematics section) problem, and I am not able to code the logic that is iterative and not recursive.

I am really trying hard to get through this problem, I just completed the introduction and graph sections.

Looking forward to help.

Thanks in advance.

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
9 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Why does it have to be iterative? A recursive solution is probably easier to implement

»
9 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I find recursive solution difficult to understand.

»
9 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

ordered_set is a cheatcode if u really wanna solve it

»
9 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Recently, I found this solution online, anyone can decode it?