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

feat: Add big number support and merge sort #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aditya211935
Copy link

Fixes:

Details

This PR contains two features:

1. Big numbers support

Currently, only one operation is permitted on big numbers, i.e. comparison.
We do this by converting the number into a string and then comparing:

  • First the length of string. Whichever number has higher length is greater.
  • If length is same then keep checking the most significant digit.

We can also add Addition, Subtraction, Multiplication by keeping a similar kind of map as we have done for GreaterMap.

2. Merge sort

Pretty standard merge sort algorithm implemented in Typescript.

@aditya211935
Copy link
Author

@anuraghazra ^

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.

1 participant