This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASSIGNMENT | |
_______________________ | |
You will be given an array of objects (associative arrays in PHP) representing data about developers | |
who have signed up to attend the next coding meetup that you are organising. | |
The list is ordered according to who signed up first. | |
Your task is to return one of the following strings: | |
< firstName here >, < country here > of the first Python developer who has signed up; or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASSIGNMENT | |
_______________________ | |
You will be given an array of objects (associative arrays in PHP) representing data about developers | |
who have signed up to attend the next coding meetup that you are organising. | |
Your task is to return: | |
true if at least one Ruby developer has signed up; or | |
false if there will be no Ruby developers. | |
_______________________ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASSIGNMENT | |
_____________________________ | |
You will be given an array of objects (hashes in ruby) representing data about developers | |
who have signed up to attend the coding meetup that you are organising for the first time. | |
Your task is to return the number of JavaScript developers coming from Europe. | |
If, there are no JavaScript developers from Europe then your function should return 0. | |
Notes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASSIGNMENT | |
______________________________ | |
You will be given an array of objects (associative arrays in PHP) representing data about developers | |
who have signed up to attend the next coding meetup that you are organising. | |
Your task is to return an array where each object will have a new property 'greeting' with the following string value: | |
Hi < firstName here >, what do you like the most about < language here >? | |
SOLUTION | |
______________________________ | |
function greetDevelopers(list) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASSIGNMENT | |
___________________________ | |
Write simple .camelCase method (camel_case function in PHP, CamelCase in C# or camelCase in Java) for strings. | |
All words must have their first letter capitalized without spaces. | |
For instance: | |
"hello case".camelCase() => HelloCase | |
"camel case word".camelCase() => CamelCaseWord |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASSIGNMENT | |
_______________________________ | |
Split a camelcase string into individual words, the return value must be a single string of words seporated by one whitespace. | |
The strings are to be split on the capital letters like so: | |
'StringStringString' => 'String String String' | |
_______________________________ | |
SOLUTION | |
_______________________________ | |
function splitter(str){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASSIGNMENT | |
____________________________ | |
Complete the solution so that it splits the string into pairs of two characters. | |
If the string contains an odd number of characters then it should | |
replace the missing second character of the final pair with an underscore ('_'). | |
Examples: | |
solution('abc') // should return ['ab', 'c_'] | |
solution('abcdef') // should return ['ab', 'cd', 'ef'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASSIGNMENT | |
_______________________________ | |
There is a bus moving in the city, and it takes and drop some people in each bus stop. | |
You are provided with a list (or array) of integer arrays (or tuples). | |
Each integer array has two items which represent number of people get into bus (The first item) | |
and number of people get off the bus (The second item) in a bus stop. | |
Your task is to return number of people who are still in the bus after the last bus station (after the last array). | |
Even though it is the last bus stop, the bus is not empty and some people are still in the bus, and they are probably sleeping there :D | |
_______________________________ | |
SOLUTION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASSIGNMENT | |
______________________________________________________ | |
Given a text, for example: | |
const inputText = "Michael, how are you? - Cool, how is John Williamns and Michael Jordan? I don't know but Michael Johnson is fine. Michael do you still score points with LeBron James, Michael Green AKA Star and Michael Wood?"; | |
get an array of last names of people named Michael. The result should be: | |
["Jordan", "Johnson", "Green", "Wood"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASSIGNMENT | |
__________________________________________________ | |
Mr. Scrooge has a sum of money 'P' that wants to invest, and he wants to know how many years 'Y' | |
this sum has to be kept in the bank in order for this sum of money to amount to 'D'. | |
The sum is kept for 'Y' years in the bank where interest 'I' is paid yearly, | |
and the new sum is re-invested yearly after paying tax 'T' | |
Note that the principal is not taxed but only the year's accrued interest |
NewerOlder