Tag:Number off

  • One line of valid Python code


    Complete the same function and write as little code as possible beginning Today I’d like to share some interestingkata, just started doing thesekataAt that time, I also wrote a long code to complete, with later onpythonIn-depth contact and discoverypythonSome simple but very powerful features help me better complete these exercises. I’ll summarize and share them […]

  • [linked list topic] soldier queue training


    A unit carries out a queue training of recruits. The recruits are numbered in sequence from the beginning and lined up in a horizontal line. The training rules are as follows: report from the beginning one to two. For those who report to the second column, the rest move closer to the small sequence number, […]

  • Joseph Ring problem solving: Joseph told me that in those years, he just won the chicken in the finals


    1. Joseph Ring problem It is said that there is such a story. After the Romans occupied jotapat, 39 Jews hid in a cave with Joseph and his friends. 39 Jews decided that they would rather die than be caught by the enemy, so they decided to commit suicide. 41 people formed a circle. The […]

  • josephus problem


    Question type description N people form a circle, starting from the first person to count, the person who reports to m goes out of the circle, and then the next person starts to count again from 1, the person who counts to m goes out of the circle, and so on, until all people come […]

  • 38. Report


    The number sequence is an integer sequence. The next number is obtained by the number sequence. The first five are as follows: 1 11 21 1211 111221 1 is read as “one 1” (“one”), that is, 11.11 is read as “two 1s” (“two ones”), i.e. 21.21 is read as “one 2”, “one 1” (“one two”, […]

  • Algorithms-Joseph Problem


    Joseph Ring Problem is a classic algorithm in interview. The origin of Joseph’s problem is: After the Romans occupied Chotapat, 39 Jews hid in a cave with Josephu and his friends. 39 Jews decided to die rather than be caught by the enemy. So they decided on a way of suicide. 41 people lined up […]