Skip to content

Latest commit

 

History

History
41 lines (23 loc) · 2.42 KB

CHALLENGE.MD

File metadata and controls

41 lines (23 loc) · 2.42 KB

Challenge : day 1 🥚

TODO

Prerequisites ✅

  • Make sure you've read all the instructions on how to complete the challenges.

  • Follow along with the daily guide.

Coding 🧑‍💻

  • Challenge 1 : Write a function add that takes two natural numbers n and m and returns the sum.

  • Challenge 2 : Write a function square that takes a natural number n and returns the area of a square of length n.

  • Challenge 3 : Write a function days_to_second that takes a number of days n and returns the number of seconds.

  • Challenge 4 : Write two functions increment_counter & clear_counter .

    • increment_counter returns the incremented value of counter by n.
    • clear_counter sets the value of counter to 0.

  • Challenge 5 : Write a function divide that takes two natural numbers n and m and returns a boolean indicating if n divides m.

  • Challenge 6 : Write a function is_even that takes a natural number n and returns a boolean indicating if n is even.

  • Challenge 7 : Write a function sum_of_array that takes an array of natural numbers and returns the sum. This function will returns 0 if the array is empty.

  • Challenge 8 : Write a function maximum that takes an array of natural numbers and returns the maximum value in the array. This function will returns 0 if the array is empty.

  • Challenge 9 : Write a function remove_from_array that takes 2 parameters : an array of natural numbers and a natural number n and returns a new array where all occurences of n have been removed (order should remain unchanged).

  • Challenge 10 :

    1. Watch this video on selection sort.
    2. Implement a function selection_sort that takes an array of natural numbers and returns the sorted array .

Good luck 🎉