CJCoding With Joseph
15free / daySign inCreate account
TitleTopicsAction
576
Factorial By RecursionComplete `factorial(n: int) -> int` so it returns n factorial by recursion. The ...
easy○ Not Started
Recursion
Solve
577
Recursive CountdownComplete `countdown(n: int) -> None` so it prints n, then n - 1, and so on down ...
easy○ Not Started
Recursion
Solve
578
Count Up On The Way BackComplete `count_up(n: int) -> None` so it prints 1, 2, and so on up to n, one nu...
easy○ Not Started
Recursion
Solve
579
Sum Of One To NComplete `sum_to(n: int) -> int` so it returns 1 + 2 + ... + n by recursion. The...
easy○ Not Started
Recursion
Solve
580
Power By Repeated MultiplyingComplete `power(base: int, exp: int) -> int` so it returns base raised to exp by...
easy○ Not Started
Recursion
Solve
581
Sum A List By SlicingComplete `sum_list(values: list[int]) -> int` so it returns the sum of the list ...
easy○ Not Started
RecursionSlicing
Solve
582
Length Without LenComplete `length(values: list[int]) -> int` so it returns how many items the lis...
easy○ Not Started
RecursionSlicing
Solve
583
Count The TargetComplete `count_occurrences(values: list[int], target: int) -> int` so it return...
easy○ Not Started
RecursionSlicing
Solve
584
Reverse A String RecursivelyComplete `reverse_string(s: str) -> str` so it returns the text reversed, by rec...
easy○ Not Started
RecursionSlicing
Solve
585
Palindrome By ShrinkingComplete `is_palindrome(s: str) -> bool` so it returns `True` when the text read...
easy○ Not Started
RecursionSlicing
Solve
586
Digit Sum By RecursionComplete `digit_sum(n: int) -> int` so it returns the sum of the digits of a non...
easy○ Not Started
RecursionOperators
Solve
587
Count The DigitsComplete `count_digits(n: int) -> int` so it returns how many digits a non-negat...
easy○ Not Started
RecursionOperators
Solve
588
Euclid By RecursionComplete `gcd(a: int, b: int) -> int` so it returns the greatest common divisor ...
easy○ Not Started
RecursionOperators
Solve
589
Hanoi Move CountComplete `hanoi_moves(n: int) -> int` so it returns the smallest number of moves...
easy○ Not Started
Recursion
Solve
590
Star Triangle By RecursionComplete `print_stars(n: int) -> None` so it prints a triangle of n rows where t...
easy○ Not Started
Recursion
Solve
591
Step Countdown By RecursionComplete `count_down_by(n: int, step: int) -> None` so it prints n, then n - ste...
easy○ Not Started
Recursion
Solve
592
Contains By RecursionComplete `contains(values: list[int], target: int) -> bool` so it returns `True`...
easy○ Not Started
RecursionSlicing
Solve
593
Smallest By RecursionComplete `min_of(values: list[int]) -> int` so it returns the smallest value in ...
easy○ Not Started
RecursionSlicing
Solve
594
Largest By RecursionComplete `largest(values: list[int]) -> int` so it returns the largest value in ...
easy○ Not Started
RecursionSlicing
Solve
595
Multiply By AddingComplete `multiply(a: int, b: int) -> int` so it returns a times b using only ad...
easy○ Not Started
Recursion
Solve
596
Binary By RecursionComplete `to_binary(n: int) -> str` so it returns the binary digits of a non-neg...
easy○ Not Started
RecursionOperators
Solve
597
Triangle NumbersComplete `triangle_number(n: int) -> int` so it returns the nth triangle number,...
easy○ Not Started
Recursion
Solve
598
Ways To ArrangeComplete `permutations_count(n: int) -> int` so it returns how many different or...
easy○ Not Started
Recursion
Solve
599
Sum Between Two NumbersComplete `sum_range(low: int, high: int) -> int` so it returns the sum of every ...
easy○ Not Started
Recursion
Solve
600
Product Of A ListComplete `product_list(values: list[int]) -> int` so it returns the product of e...
easy○ Not Started
RecursionSlicing
Solve
601
Print Each Item RecursivelyComplete `print_list(values: list[int]) -> None` so it prints every item of the ...
easy○ Not Started
RecursionSlicing
Solve
602
Print The List BackwardsComplete `print_backwards(values: list[int]) -> None` so it prints every item of...
easy○ Not Started
RecursionSlicing
Solve
603
Even By Two StepsComplete `is_even(n: int) -> bool` so it returns `True` for an even non-negative...
easy○ Not Started
Recursion
Solve
604
Character Tally By RecursionComplete `count_char(s: str, ch: str) -> int` so it returns how many times the s...
easy○ Not Started
RecursionSlicing
Solve
605
Naive FibonacciWrite `fib(n: int) -> int` that returns the nth Fibonacci number by plain recurs...
medium○ Not Started
Recursion
Solve
606
Flatten A List Of ListsWrite `flatten(values: list[list[int]]) -> list[int]` that returns one flat list...
medium○ Not Started
RecursionSlicing
Solve
607
Count Even NumbersWrite `count_evens(values: list[int]) -> int` that returns how many even numbers...
medium○ Not Started
RecursionOperators
Solve
608
Reverse A List RecursivelyWrite `reverse_list(values: list[int]) -> list[int]` that returns a new list wit...
medium○ Not Started
RecursionSlicing
Solve
609
Sum Of SquaresWrite `sum_squares(n: int) -> int` that returns 1 * 1 + 2 * 2 + ... + n * n by r...
medium○ Not Started
Recursion
Solve
610
Index Of TargetWrite `index_of(values: list[int], target: int, position: int) -> int` that retu...
medium○ Not Started
Recursion
Solve
611
Sorted Check By RecursionWrite `is_sorted(values: list[int]) -> bool` that returns `True` when every valu...
medium○ Not Started
RecursionSlicing
Solve
612
Binary String To NumberWrite `from_binary(bits: str) -> int` that returns the value of a string of 0s a...
medium○ Not Started
RecursionSlicing
Solve
613
Ways To Climb StairsWrite `climb_ways(n: int) -> int` that returns how many different ways there are...
medium○ Not Started
Recursion
Solve
614
Binomial By RecursionWrite `choose(n: int, k: int) -> int` that returns the number of ways to pick k ...
medium○ Not Started
Recursion
Solve
615
Digits Reversed With An AccumulatorWrite `reverse_digits(n: int, acc: int) -> int` that returns the digits of a non...
medium○ Not Started
RecursionOperators
Solve
616
Join Words With CommasWrite `join_words(words: list[str]) -> str` that returns the words joined into o...
medium○ Not Started
RecursionSlicing
Solve
617
Down Then Back UpWrite `bounce(n: int) -> None` that prints n, n - 1, down to 1 and then 1, 2, ba...
medium○ Not Started
Recursion
Solve
618
Power Of Two By HalvingWrite `is_power_of_two(n: int) -> bool` that returns `True` when a non-negative ...
medium○ Not Started
RecursionOperators
Solve
619
Largest DigitWrite `max_digit(n: int) -> int` that returns the largest single digit in a non-...
medium○ Not Started
RecursionOperators
Solve
620
Remove A LetterWrite `remove_char(s: str, ch: str) -> str` that returns the text s with every c...
medium○ Not Started
RecursionSlicing
Solve
621
Memoised FibonacciThe plain recursive Fibonacci function calls itself twice per step, so `fib(30)`...
hard○ Not Started
Recursion
Solve
622
Towers Of HanoiWrite `hanoi(n: int, source: str, target: str, spare: str) -> None` that prints ...
hard○ Not Started
Recursion
Solve
623
Recursive Binary SearchWrite `binary_search(values: list[int], target: int, low: int, high: int) -> int...
hard○ Not Started
Recursion
Solve
624
Fast Exponent By SquaringWrite `exponent_fast(base: int, exp: int) -> int` that returns base raised to ex...
hard○ Not Started
RecursionOperators
Solve
625
Digit Sum Until One DigitWrite two recursive functions. `digit_sum(n: int) -> int` returns the sum of the...
hard○ Not Started
RecursionOperators
Solve