christmas carol (source)
- Print the lyrics to the Christmas carol “The Twelve Days of Christmas,” taking advantage of the repetition in the song.
company database (source)
- Using a hash map and vectors, create a text interface to allow a user to add employee names to a department in a company. For example, “Add Sally to Engineering” or “Add Amir to Sales.” Then let the user retrieve a list of all people in a department or all people in the company by department, sorted alphabetically.
days between dates (source)
- Create a function that takes two dates and returns the number of days between the first and second date. - https://edabit.com/challenge/3hdXjfJozQySRC3gE
fibonacci (source)
- Generate the nth Fibonacci number
find median and mode (source)
- Given a list of integers, use a vector and return the median (when sorted, the value in the middle position) and mode (the value that occurs most often; a hash map will be helpful here) of the list.
harvest festival (source)
- You have cultivated a plant, and after three long months, the time has come to reap the fruits (or the flowers, in this case) of your hard work. During the growth phase, you added water and fertilizer, and kept a constant temperature. It's time to check how much the plant has grown! - https://edabit.com/challenge/CmWQTvvkXSeaNGdDy
how much is true (source)
- Create a function which returns the number of true values there are in an array. - https://edabit.com/challenge/GLbuMfTtDWwDv2F73
pig latin (source)
- Convert strings to pig latin. The first consonant of each word is moved to the end of the word and “ay” is added, so “first” becomes “irst-fay.” Words that start with a vowel have “hay” added to the end instead (“apple” becomes “apple-hay”). Keep in mind the details about UTF-8 encoding!
Does the Triangle Fit into the Triangular Hole (source)
- Create a function that takes the dimensions of two triangles (as arrays) and checks if the first triangle fits into the second one. - https://edabit.com/challenge/7e2Aq87tDpW2CK7XH