Skip to content

zainabnazar/AND-Solution-HTML-JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AND-Solution-HTML-JS

https://zainabalkaleefa.github.io/AND-Solution-HTML-JS/

This AND-Siblings Calculator is used to Write a function that, given any String input, returns all the distinct AND-Siblings that can be formed by the positive integers that can be found on it in descending order. Please keep in mind the efficiency of your algorithm when writing the solution.

For example:

If the input provided is: “236”, then your solution should return "632,623,362,326,263,236" as these are all the combination that can be made with integers that the string contains

If the input provided is: “A 3B2 C6D”, then your solution should return "632,623,362,326,263,236" as well, but this time notice that the provided string had nonintegers characters and whitespaces, so an extraction of integers was first made to obtain the correct solution

If the input provided does not contain any integers: “ABC”, then your solution should return the appropriate error exception message.