If you really want to learn C and improve through the challenges, don't just copy my solutions. You won't learn anything that way! (Cheating and plagiarizing is not permitted on the Codewars website. Violators will face account suspension or ban.)
My solutions to some Codewars challenges, programmed in C, might not be the most sophisticated, but at least mostly easy to read and understand. However, a few are implemented rather poorly.
Current C rank (since February 1, 2026): 2 kyu.
See also:
- My solutions to Codewars challenges - programmed in C++
- My solutions to Codewars challenges - programmed in Pascal
- My solutions to Codewars challenges - programmed in Python
The code I released here into the public domain may appear in third-party projects. I do not maintain, endorse, or have any affiliation with such projects. Any malicious or deceptive use is unauthorized and should be reported to the hosting platform.
- <1 kyu> 7×7 Skyscrapers - Solution: skyscrapers_7x7_puzzle.c
- <2 kyu> 6 By 6 Skyscrapers - Solution: skyscrapers_6x6_puzzle.c
- <2 kyu> Evaluate mathematical expression - Solution: eval_math_expression.c
- <2 kyu> Integer Square Root - Solution: integer_sqrt.c
- <2 kyu> Optical character recognition - Solution: ocr.c
- <3 kyu> Divide integers as strings - Solution: divide_number_strings.c
- <3 kyu> Make a spiral - Solution: make_spiral.c
- <4 kyu> 4 By 4 Skyscrapers - Solution: skyscrapers_4x4_puzzle.c
- <4 kyu> Adding Big Numbers - Solution: adding_big_numbers.c
- <4 kyu> Counting Change Combinations - Solution: counting_change_combinations.c
- <4 kyu> Escape the maze - Solution: escape_the_maze.c
- <4 kyu> Large Factorials - Solution: large_factorials.c
- <4 kyu> Matrix Determinant - Solution: determinant.c
- <4 kyu> Multiplying numbers as strings - Solution: multiply_number_strings.c
- <4 kyu> Next bigger number with the same digits - Solution: next_bigger_number.c
- <4 kyu> Number of Proper Fractions with Denominator d - Solution: number_proper_fractions.c
- <4 kyu> Ordered set - Solution: ordered_set.c
- <4 kyu> parseInt() reloaded - Solution: parseint-reloaded.c
- <4 kyu> Range Extraction - Solution: range_extraction.c
- <4 kyu> Ranking Poker Hands - Solution: ranking_poker_hands.c
- <4 kyu> Rectangle Rotation - Solution: rectangle_rotation.c
- <4 kyu> Roman Numerals Helper - Solution: roman_num_helper.c
- <4 kyu> Snail - Solution: snail_sort.c
- <4 kyu> Square into Squares. Protect trees! - Solution: square_into_squares.c
- <4 kyu> Strings Mix - Solution: strings_mix.c
- <4 kyu> Sum of Intervals - Solution: sum_of_intervals.c
- <4 kyu> Sum Strings as Numbers - Solution: sum_number_strings.c
- <4 kyu> The observed PIN - Solution: the_observed_pin.c
- <5 kyu> Base64 Encoding - Solution: base64.c
- <5 kyu> Base64 Numeric Translator - Solution: base64_numeric_translator.c
- <5 kyu> Beeramid - Solution: beeramid.c
- <5 kyu> Big Integer Modulo - Solution: big_integer_modulo.c
- <5 kyu> Blackjack Scorer - Solution: blackjack_scorer.c
- <5 kyu> Common Denominators - Solution: common_denominators.c
- <5 kyu> Convert A Hex String To RGB - Solution: hex_string_to_rgb.c
- <5 kyu> Count IP Addresses - Solution: count_ip_addresses.c
- <5 kyu> Directions Reduction - Solution: directions_reduction.c
- <5 kyu> Factorial decomposition - Solution: factorial_decomposition.c
- <5 kyu> Grab CSV Columns - Solution: grab_csv_columns.c
- <5 kyu> Greed is Good - Solution: greed_is_good.c
- <5 kyu> Human Readable Time - Solution: format_duration.c
- <5 kyu> Human Readable Time - Solution: human_readable_time.c
- <5 kyu> int32 to IPv4 - Solution: int32_to_ipv4.c
- <5 kyu> ISBN-10 Validation - Solution: is_valid_ISBN_10.c
- <5 kyu> Josephus Permutation - Solution: josephus_permutation.c
- <5 kyu> Josephus Survivor - Solution: josephus_survivor.c
- <5 kyu> Land perimeter - Solution: land_perimeter.c
- <5 kyu> Last digit of a large number - Solution: last_digit_of_large_number.c
- <5 kyu> Least Common Multiple - Solution: least_common_multiple.c
- <5 kyu> Maximum subarray sum - Solution: maximum_subarray_sum.c
- <5 kyu> Mean Square Error - Solution: mean_square_error.c
- <5 kyu> Merged String Checker - Solution: merged_string_checker.c
- <5 kyu> Moving Zeros To The End - Solution: move_zeros.c
- <5 kyu> Not very secure - Solution: not_very_secure.c
- <5 kyu> Number of trailing zeros of N! - Solution: factorial_trailing_zeros.c
- <5 kyu> Parsing goto statements - Solution: parsing_goto_statements.c
- <5 kyu> Perimeter of squares in a rectangle - Solution: fibonacci_squares_perimeter.c
- <5 kyu> Primes in numbers - Solution: prime_factor_decomposition.c
- <5 kyu> Product of consecutive Fib numbers - Solution: product_consecutive_fibnum.c
- <5 kyu> Rational Arithmetic - Solution: rational_arithmetic.c
- <5 kyu> (Ready for) Prime Time - Solution: prime_time.c
- <5 kyu> Return substring instance count - 2 - Solution: substring_instance_count.c
- <5 kyu> RGB To Hex Conversion - Solution: rgb_to_hex.c
- <5 kyu> ROT13 - Solution: rot13.c
- <5 kyu> Rotate an array matrix - Solution: rotate.c
- <5 kyu> Scramblies - Solution: scramble.c
- <5 kyu> Snakes and Ladders - Solution: snakes_and_ladders.c
- <5 kyu> Sort - one, three, two - Solution: sort_one_three_two.c
- <5 kyu> Square Matrix Multiplication - Solution: square_matrix_multiplication.c
- <5 kyu> String incrementer - Solution: string_incrementer.c
- <5 kyu> Strings: implement your own "strtok" function! - Solution: my_strtok.c
- <5 kyu> The Clockwise Spiral - Solution: clockwise_spiral.c
- <5 kyu> Tic-Tac-Toe Checker - Solution: tic_tac_toe_checker.c
- <5 kyu> Value of x - Solution: value_of_x.c
- <5 kyu> Weight for weight - Solution: weight_for_weight.c
- <5 kyu> Write out numbers - Solution: write_out_numbers.c
- <5 kyu> Write your own printf - Solution: your_own_printf.c
- <5 kyu> Zonk game - Solution: zonk_game.c
- <6 kyu> Array.diff - Solution: array_diff.c
- <6 kyu> Array Exchange - Solution: array_exchange.c
- <6 kyu> Backspaces in string - Solution: strclr.c
- <6 kyu> Bit Counting - Solution: bit_counting.c
- <6 kyu> Build Tower - Solution: build_tower.c
- <6 kyu> CamelCase Method - Solution: string_to_camel_case.c
- <6 kyu> Count characters in your string - Solution: count_characters.c
- <6 kyu> Counting Duplicates - Solution: counting_duplicates.c
- <6 kyu> Create Phone Number - Solution: create_phone_number.c
- <6 kyu> Decode the Morse code - Solution: decode_morse.c
- <6 kyu> Detect Pangram - Solution: detect_pangram.c
- <6 kyu> Equal Sides Of An Array - Solution: equal_sides_of_array.c
- <6 kyu> Find the odd int - Solution: find_the_odd_int.c
- <6 kyu> Find The Parity Outlier - Solution: find_parity_outlier.c
- <6 kyu> Find the unique number - Solution: find_the_unique_number.c
- <6 kyu> IP Validation - Solution: is_valid_ip.c
- <6 kyu> Irreducible Sum of Rationals - Solution: irreducible_sum_of_rationals.c
- <6 kyu> Is a number prime? - Solution: is_prime.c
- <6 kyu> Matrix Addition - Solution: matrix_addition.c
- <6 kyu> Matrix Transpose - Solution: transpose_matrix.c
- <6 kyu> Multiples of 3 or 5 - Solution: multiples_of_3_or_5.c
- <6 kyu> Multiplication table - Solution: multiplication_table.c
- <6 kyu> Non-even substrings - Solution: non_even_substrings.c
- <6 kyu> Replace With Alphabet Position - Solution: alphabet_position.c
- <6 kyu> Reverse a singly-linked list - Solution: reverse_linked_list.c
- <6 kyu> Roman Numerals Decoder - Solution: decode_roman.c
- <6 kyu> Roman Numerals Encoder - Solution: roman_num_encoder.c
- <6 kyu> Rotate matrix counter - clockwise N - times! - Solution: rotate_matrix_counter_clockwise.c
- <6 kyu> Run-length encoding - Solution: run_length_encoding.c
- <6 kyu> Sentence Calculator - Solution: letters_to_numbers.c
- <6 kyu> Simple time difference - Solution: simple_time_difference.c
- <6 kyu> Sort the odd - Solution: sort_the_odd.c
- <6 kyu> Stop gninnipS My sdroW! - Solution: spin_words.c
- <6 kyu> Sum of Digits / Digital Root - Solution: digital_root.c
- <6 kyu> Take a Ten Minutes Walk - Solution: ten_minutes_walk.c
- <6 kyu> Valid Braces - Solution: valid_braces.c
- <6 kyu> Which day of the week does this date fall on? - Solution: find_date.c
- <6 kyu> Who likes it? - Solution: who_likes_it.c
- <6 kyu> Write Number in Expanded Form - Solution: expanded_form.c
- <6 kyu> Your order, please - Solution: order_words.c
- <7 kyu> Alphabetically ordered - Solution: is_ordered.c
- <7 kyu> Anagram Detection - Solution: is_anagram.c
- <7 kyu> Binary Addition - Solution: binary_addition.c
- <7 kyu> Categorize New Member - Solution: categorize_new_member.c
- <7 kyu> Consecutive Vowels in a String - Solution: get_the_vowels.c
- <7 kyu> Count of codepoints in a UTF-8 string - Solution: count_codepoints.c
- <7 kyu> Credit Card Mask - Solution: maskify.c
- <7 kyu> Deodorant Evaporator - Solution: evaporator.c
- <7 kyu> Find the next perfect square! - Solution: next_perfect_square.c
- <7 kyu> First Fibonacci - Solution: first_fibonacci.c
- <7 kyu> Get the Middle Character - Solution: get_middle_character.c
- <7 kyu> Highest and Lowest - Solution: high_and_low.c
- <7 kyu> Is this a triangle? - Solution: is_triangle.c
- <7 kyu> Reverse words - Solution: reverse_words.c
- <7 kyu> Simple string reversal II - Solution: reverse_between.c
- <7 kyu> Sort Numbers - Solution: sort_numbers.c
- <7 kyu> Square Every Digit - Solution: square_digits.c
- <7 kyu> String ends with? - Solution: string_ends_with.c
- <7 kyu> Sum of two lowest positive integers - Solution: sum_two_smallest_numbers.c
- <7 kyu> TV Remote - Solution: tv_remote.c
- <7 kyu> Two to One - Solution: longest.c
- <7 kyu> Vowel Count - Solution: get_count.c
- <8 kyu> Convert a string to an array - Solution: convert_string_to_array.c
- <8 kyu> Difference of Volumes of Cuboids - Solution: cuboids_volumes_difference.c
- <8 kyu> DNA to RNA Conversion - Solution: dna_to_rna_conversion.c
- <8 kyu> Do I get a bonus? - Solution: bonus_time.c
- <8 kyu> Grasshopper - Summation - Solution: grasshopper_summation.c
- <8 kyu> Reversed Strings - Solution: string_reverse.c
