Implement string and basic ML algorithms | Meta Interview Question