This CLI offers a selection of algorithms that you can list and execute directly from the terminal. Currently, the CLI supports the "Find the Happy Numbers" algorithm.
Make sure you have bun installed. Clone this repository and navigate to the project directory. Install the necessary dependencies (if any).
To install dependencies:
bun install
Run the commands as described above to list and execute algorithms directly from the terminal.
Displays a list of all available algorithms.
bun start
Welcome to the algorithm CLI
Which you want to test?
? Select a algorithm (Use arrow keys)
❯ Find the Happy Numbers
Permutable Palindrome Verification
- Anagram Verification
- Subsequence Verification
- Prime Number Sequence
Welcome to the algorithm CLI
Which you want to test?
? Select a algorithm (Use arrow keys)
❯ Find the Happy Numbers
Permutable Palindrome Verification
- Anagram Verification
- Subsequence Verification
- Prime Number Sequence
? Select a package Find the Happy Numbers
✔ Executing!
? Enter a number 19
✔ The value provided is happy a number!
Numbers seen: 82,68,100
happy numbers between 1 and 19: 1,7,10,13,19
? Select a package Find the Happy Numbers
✔ Executing!
? Enter a number 45
✖ The value provided is not a happy number!
Numbers seen: 41,17,50,25,29,85,89,145,42,20,4,16,37,58
happy numbers between 1 and 45: 1,7,10,13,19,23,28,31,32,44
? Select a package Find the Happy Numbers
✔ Executing!
? Enter a number test
✖ The value provided is not a valid option: test
Welcome t the algorithm CLI
Which you want to test?
? Select a algorithm
Find the Happy Numbers
❯ Permutable Palindrome Verification
- Anagram Verification
? Select a algorithm Permutable Palindrome Verification
✔ Executing!
? Enter a text civic
✔ It`s a palindrome: civic
algorithm run 2 hello
✖ This text is not palindrome: hello
✖ Invalid parameter
❌ Invalid parameter
Welcome to the algorithm CLI
Which you want to test?
? Select a algorithm
Find the Happy Numbers
Permutable Palindrome Verification
❯ Anagram Verification
- Subsequence Verification
- Prime Number Sequence
? Select a algorithm Anagram Verification
✔ Executing!
? Enter a first text silent
? Enter a second text listen
✔ Theses text are anagrams of each other.
? Select a algorithm Anagram Verification
✔ Executing!
? Enter a first text @54-
? Enter a second text 456
✖ Text contains special characters or numbers, which are not allowed.These text cannot be an anagram.
? Select a algorithm Anagram Verification
✔ Executing!
? Enter a first text não PoSsô
? Enter a second text noa ossop
✔ Theses text are anagrams of each other.
Welcome to the algorithm CLI
Which you want to test?
? Select a algorithm
Find the Happy Numbers
Permutable Palindrome Verification
Anagram Verification
❯ Subsequence Verification
- Prime Number Sequence
? Select a algorithm Anagram Verification
✔ Executing!
? Enter a first text abc
? Enter a second text ahbgdc
✔ "abc" can be a subsequence from "ahbgdc"
? Select a algorithm Anagram Verification
✔ Executing!
? Enter a first text axc
? Enter a second text ahbgdc
✖ "axc" cannot be a subsequence from "ahbgdc"
? Select a algorithm Anagram Verification
✔ Executing!
? Enter a first text acE
? Enter a second text abcde
✖ "acE" cannot be a subsequence from "abcde"
Welcome to the algorithm CLI
Which you want to test?
? Select a algorithm
Find the Happy Numbers
Permutable Palindrome Verification
Anagram Verification
Subsequence Verification
❯ Prime Number Sequence
? Select a algorithm Anagram Verification
✔ Executing!
? Enter a number 30.
✖ 30 is not a prime a number!
The Prime numbers up to 30: 2,3,5,7,11,13,17,19,23,29
The sum of all prime numbers up to 30 is 129
? Select a algorithm Anagram Verification
✔ Executing!
? Enter a number 37.
✔ 37 is a prime a number!
The Prime numbers up to 37: 2,3,5,7,11,13,17,19,23,29,31,37
The sum of all prime numbers up to 37 is 197
? Select a algorithm Anagram Verification
✔ Executing!
? Enter a number 120.
✖ 120 is not a prime a number!
The Prime numbers up to 120: 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113
The sum of all prime numbers up to 120 is 1593
- Find the Happy Numbers: Finds all happy numbers up to the specified number.
- Permutable Palindrome Verification: can form a palindrome.
- Anagram Verification: can form an anagram.
- Subsequence Verification: is a sequence that can be derived from another sequence by removing some or no elements.
- Prime Number Sequence: Prime numbers are numbers greater than 1 that can only be divided by 1 and themselves. In this challenge, you need to generate a sequence of prime numbers up to a given value.