The letter S in a light blue, stylized speech bubble followed by SpeakBits
SpeakBitsThe letter S in a light blue, stylized speech bubble followed by SpeakBits
Trending
Top
New
Controversial
Search
Groups

Enjoying SpeakBits?

Support the development of it by donating to Patreon or Ko-Fi.
About
Rules
Terms
Privacy
EULA
Cookies
Blog
Have feedback? We'd love to hear it!

Coding challenges to help improve your programming logic skills.

chat-to.dev
submitted
a year ago
bygorpo85totechnology

Summary

Here's a list of challenges to improve our programming practices. 1. Write a recursive function to calculate the factorial of a number. 2. Write the sum of all the elements in an array. 3. Check if a string is a palindrome. 4. Implement a sorting algorithm to sort a list. Anagram Check: Write a function to check if two strings are anagrams of each other. Leave a solution for one of them in the comments. Anagram Check is a function that checks if two words are an anagram of eachother. Leave your own solution for this one.
5

1 Comments

3
justadev
a year ago
Just a note on your recursive factorial solution: you're missing a check for a negative number, otherwise I can drop in a negative number and have it loop infinitely.