Skip to content

Instantly share code, notes, and snippets.

@inspector-ambitious
Last active July 8, 2022 08:59
Show Gist options
  • Select an option

  • Save inspector-ambitious/8868e2e51667625e5771fb45ef4d0cd8 to your computer and use it in GitHub Desktop.

Select an option

Save inspector-ambitious/8868e2e51667625e5771fb45ef4d0cd8 to your computer and use it in GitHub Desktop.

Exercise 1

Write a function that compute the sum of all the elements of an array of integers.

Example

input: [1, 2, 2, 3, 3, 4, 5, 6, 5, 7, 7, 7, 8, 8, 1] output: 69

Exercise 2

Write a the function to reverse a string.

Example

input: "abcde" output: "edcba"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment