Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more examples #3

Open
xhliu opened this issue May 16, 2022 · 2 comments
Open

more examples #3

xhliu opened this issue May 16, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@xhliu
Copy link
Collaborator

xhliu commented May 16, 2022

sorting: bubble/insert

https://www.geeksforgeeks.org/python-program-for-bubble-sort/
https://medium.com/coinmonks/linked-lists-in-solidity-cfd967af389b

@xhliu xhliu added the enhancement New feature or request label May 16, 2022
@xhliu
Copy link
Collaborator Author

xhliu commented May 30, 2022

@walker9296

@walker9296
Copy link

Bubble sort sCrypt library

  1. source file
    bubbleSort.scrypt
  2. Function
    static function sort(Int[ARRAY_ITEM_MAX] arr) : Int[ARRAY_ITEM_MAX]
    arr the int array to be sorted
    rtn sorted int array
  3. Use limitations, the definition of the length of the array
    static const int ARRAY_ITEM_MAX = 10;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants