Skip to content

colorlessenergy/balance-both-sides

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

balance both sides

task

Each exclamation mark weight is 2; Each question mark weight is 3. Put two string left and right to the balance, Are they balanced?

If the left side is more heavy, return "Left"; If the right side is more heavy, return "Right"; If they are balanced, return "Balance".

Examples balance("!!","??") === "Right" balance("!??","?!!") === "Left" balance("!?!!","?!?") === "Left" balance("!!???!????","??!!?!!!!!!!") === "Balance"

Releases

No releases published

Packages

No packages published