Binary Addition 03/12/2020 Implement a function that adds two numbers together and returns their sum in binary. The conversion can be done before, or after the addition.
The binary number returned should be a string.
Who likes it?
You probably know the "like" system from Facebook and other pages. People can "like" blog posts, pictures or other items. We want to create the text that should be displayed next to such an item.
Implement a function likes :: [String] -> String, which must take in input array, containing the names of people who like an item. It must return the display text as shown in the examples:
likes [] -- must be "no one likes this" likes ["Peter"] -- must be "Peter likes this" likes ["Jacob", "Alex"] -- must be "Jacob and Alex like this" likes ["Max", "John", "Mark"] -- must be "Max, John and Mark like this" likes ["Alex", "Jacob", "Mark", "Max"] -- must be "Alex, Jacob and 2 others like this"
DUPLICATE ENCODER
The goal of this exercise is to convert a string to a new string where each character in the new string is "(" if that character appears only once in the original string, or ")" if that character appears more than once in the original string. Ignore capitalization when determining if a character is a duplicate.
Examples "din" => "(((" "recede" => "()()()" "Success" => ")())())" "(( @" => "))(("
Notes Assertion messages may be unclear about what they display in some languages. If you read "...It Should encode XXX", the "XXX" is the expected result, not the input!