Are you familiar with DEV? From their own site (read more about them here:
DEV is a community of software developers getting together to help one another out. The software industry relies on collaboration and networked learning. We provide a place for that to happen.
Turns out, they’ve been posting daily code challenges from CodeWars for the past 8 months or so. Which means… there are a lot of challenges to practice! . Here’s the latest one (June 10th):
Write function smaller(arr) that given an array arr,
you have to return the amount of numbers that are
smaller to the right of that number in the index.
For example:
smaller([5, 4, 3, 2, 1]) === [4, 3, 2, 1, 0]
smaller([1, 2, 0]) === [1, 1, 0]
Tests:
smaller([5, 4, 3, 2, 1])
smaller([1, 2, 3])
smaller([1, 1, -1, 0, 0])
smaller([5, 4, 7, 9, 2, 4, 4, 5, 6])
Link to the post Dev daily challenge.
Challenges are great ways to brush up on your coding knowledge, and to learn new ways of thinking about algorithms and problem-solving strategies. Code challenges can be pretty addicting and there are plenty of sites that specialize on them. Best of luck!