GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    Kirino Kousaka (kirino@shitpost.cloud)'s status on Saturday, 24-May-2025 17:13:07 JSTKirino KousakaKirino Kousaka
    in reply to
    • USLUCK
    • nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
    Sort of, also with sorting algorithms and sich.

    It's called Tower of Hanoi.
    Imagine you have 3 poles (A, B, C) and N disks. The discs can only be in ascending order of size so a larger disk can never go on top of a smaller disk.

    The goal is to move the stack from the left-most column to the right-most column. You can only move one disk at a time and only in a LIFO fashion. Now the trick is writing a program which can solve for it, to be honest I get the joke but... it doesn't seem that hard.

    I'm supposing it might be a leetcode question or a common problem given in CS classes hence the PTSD. It's actually the perfect kind of problem to be broken down into sub-problems -- aka ideal for recursive functions.
    In conversationabout a day ago from shitpost.cloudpermalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.