Skip to content

Conversation

@tony-aptx4869
Copy link
Contributor

  1. hanoi_stack.wy 漢諾塔·堆棧法
    Because the time complexity of the recursive method is too large and the memory is too large, wy-lang cannot handle more than 23 disks and will crash. So I wrote this program to implement the Hanoi Tower algorithm using the stack, in fact, the array. Since wy-lang do not support the JS function array.pop(), I wrote 2 functions to do the pop thing. Now this program can calculate 64 disks until the next Big Bang. LOL.
  2. fibonacci_array.wy 斐氏列·數組法
    Similar reasons. I improved the Fibonacci sequence program with arrays to save all numbers.

1. hanoi_stack.wy 漢諾塔·堆棧法
Because the time complexity of the recursive method is too large and the memory is too large, wy-lang cannot handle more than 23 disks and will crash. So I wrote this program to implement the Hanoi Tower algorithm using the stack, in fact, the array. Since wy-lang do not support the JS function array.pop(), I wrote 2 functions to do the pop thing. Now this program can calculate 64 disks until the next Big Bang. LOL.
2. fibonacci_array.wy 斐氏列·數組法
Similar reasons. I improved the Fibonacci sequence program with arrays to save all numbers.
Update tab format.
@LingDong- LingDong- merged commit 6076823 into wenyan-lang:master Feb 8, 2020
@LingDong-
Copy link
Member

Haha Great! Thank you so much for the new examples.

@tony-aptx4869
Copy link
Contributor Author

Go to see what's new in Open Collective. 😁😁😁

@LingDong-
Copy link
Member

Wow! our first backer! Thanks a lot!! :D

@tony-aptx4869 tony-aptx4869 deleted the patch-1 branch February 9, 2020 08:50
@antfu antfu mentioned this pull request Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants