Skip to content

hapepo23/codewars-cplusplus-challenges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

101 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My solutions to Codewars challenges - programmed in C++.

C++

badge


A word of warning

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, as I am still a beginner.

Current C++ rank (since March 5, 2026): 4 kyu.


See also:


!! Security Notice !!

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.


List of all challenges I solved in C++

  1. <2 kyu> Evaluate mathematical expression - Solution: eval_math_expression.cpp
  2. <3 kyu> The Lift - Solution: the_lift.cpp
  3. <4 kyu> Grazing Donkey - Solution: grazing_donkey.cpp
  4. <4 kyu> Matrix Determinant - Solution: determinant.cpp
  5. <4 kyu> Number of Proper Fractions with Denominator d - Solution: number_proper_fractions.cpp
  6. <4 kyu> Vigenère Cipher Helper - Solution: vigenere_cipher_helper.cpp
  7. <5 kyu> Beeramid - Solution: beeramid.cpp
  8. <5 kyu> Build a quadratic equation - Solution: build_quadratic_equation.cpp
  9. <5 kyu> Calculating with Functions - Solution: calculating_with_functions.cpp
  10. <5 kyu> Lazy Repeater - Solution: lazy_repeater.cpp
  11. <5 kyu> Rot13 - Solution: rot13.cpp
  12. <5 kyu> Simultaneous Equations - Three Variables - Solution: three_equations_three_unknowns.cpp
  13. <5 kyu> The Hashtag Generator - Solution: hashtag_generator.cpp
  14. <6 kyu> Are they the "same"? - Solution: same_arrays.cpp
  15. <6 kyu> Banker's Plan - Solution: bankers_plan.cpp
  16. <6 kyu> Bouncing Balls - Solution: bouncing_balls.cpp
  17. <6 kyu> Calculate the area of a regular n sides polygon inside a circle of radius r - Solution: polygon_area_inside_circle.cpp
  18. <6 kyu> Combinations Produced by n Coin Flips - Solution: coin_flips.cpp
  19. <6 kyu> Common array elements - Solution: common_array_elements.cpp
  20. <6 kyu> Count the smiley faces! - Solution: count_smileys.cpp
  21. <6 kyu> Delete occurrences of an element if it occurs more than n times - Solution: delete_occurrences_above_limit.cpp
  22. <6 kyu> Duplicate Encoder - Solution: duplicate_encoder.cpp
  23. <6 kyu> Find most frequent element in a list - Solution: find_most_frequent.cpp
  24. <6 kyu> Find the missing letter - Solution: find_missing_letter.cpp
  25. <6 kyu> Find the odd int - Solution: find_the_odd_int.cpp
  26. <6 kyu> FIXME: Hello - Solution: fixme_hello.cpp
  27. <6 kyu> Highest Scoring Word - Solution: highest_scoring_word.cpp
  28. <6 kyu> (L33T + Grεεκ) Case - Solution: leet_greek_case.cpp
  29. <6 kyu> Make the Deadfish Swim - Solution: make_the_deadfish_swim.cpp
  30. <6 kyu> Mexican Wave - Solution: mexican_wave.cpp
  31. <6 kyu> Multiple of 11 - Solution: multiple_of_eleven.cpp
  32. <6 kyu> Potion Class 101 - Solution: potion_class_101.cpp
  33. <6 kyu> Prime Factors - Solution: prime_factors.cpp
  34. <6 kyu> Prime Word - Solution: prime_word.cpp
  35. <6 kyu> Rectangle into Squares - Solution: rectangle_into_squares.cpp
  36. <6 kyu> Split Strings - Solution: split_strings.cpp
  37. <6 kyu> Sums of Parts - Solution: sum_of_parts.cpp
  38. <6 kyu> Sum The Tree - Solution: sum_the_tree.cpp
  39. <6 kyu> Train your skills in creation of classes - Solution: class_creation_skills.cpp
  40. <6 kyu> Unique In Order - Solution: unique_in_order.cpp
  41. <7 kyu> Convert Time to String - Solution: convert_time_to_string.cpp
  42. <7 kyu> Correct the time-string - Solution: correct_time_string.cpp
  43. <7 kyu> Descending Order - Solution: descending_order.cpp
  44. <7 kyu> Disemvowel Trolls - Solution: disemvowel.cpp
  45. <7 kyu> Drone Fly-By - Solution: drone_fly_by.cpp
  46. <7 kyu> Find Count of Most Frequent Item in an Array - Solution: most_frequent_item_count.cpp
  47. <7 kyu> Friend or Foe? - Solution: friend_or_foe.cpp
  48. <7 kyu> FromPascalToCpp - Solution: from_pascal_to_cpp.cpp
  49. <7 kyu> Fun with operators - Solution: fun_with_operators.cpp
  50. <7 kyu> Growth of a Population - Solution: population_growth.cpp
  51. <7 kyu> Isograms - Solution: isograms.cpp
  52. <7 kyu> Mumbling - Solution: mumbling.cpp
  53. <7 kyu> Number of People in the Bus - Solution: people_in_the_bus.cpp
  54. <7 kyu> Pointer Swap - Solution: pointer_swap.cpp
  55. <7 kyu> Printer Errors - Solution: printer_errors.cpp
  56. <7 kyu> Pyramid Structure Analyzer - Solution: pyramid_structure_analyzer.cpp
  57. <7 kyu> Remove All The Marked Elements of a List - Solution: remove_array_values.cpp
  58. <7 kyu> Shortest Word - Solution: shortest_word.cpp
  59. <7 kyu> Sort array by string length - Solution: sort_array_by_string_length.cpp
  60. <7 kyu> String matchup - Solution: string_matchup.cpp
  61. <7 kyu> String Scramble - Solution: string_scramble.cpp
  62. <7 kyu> Sum of odd numbers - Solution: sum_of_odd_numbers.cpp
  63. <7 kyu> The Office I - Outed - Solution: the_office_outed.cpp
  64. <7 kyu> You're a square! - Solution: is_square.cpp
  65. <8 kyu> Bin to Decimal - Solution: bin_to_decimal.cpp
  66. <8 kyu> Century From Year - Solution: century_from_year.cpp
  67. <8 kyu> Convert a Number to a String! - Solution: number_to_string.cpp
  68. <8 kyu> Convert boolean values to strings 'Yes' or 'No'. - Solution: boolean_to_string.cpp
  69. <8 kyu> Convert number to reversed array of digits - Solution: digitize.cpp
  70. <8 kyu> Count by X - Solution: count_by_x.cpp
  71. <8 kyu> Double Char - Solution: double_char.cpp
  72. <8 kyu> Find Maximum and Minimum Values of a List - Solution: find_maximum_and_minimum.cpp
  73. <8 kyu> Find the smallest integer in the array - Solution: smallest_value.cpp
  74. <8 kyu> Get the mean of an array - Solution: get_array_average.cpp
  75. <8 kyu> How good are you really? - Solution: how_good_really.cpp
  76. <8 kyu> I love you, a little , a lot, passionately ... not at all - Solution: how_much_i_love_you.cpp
  77. <8 kyu> Personalized Message - Solution: personalized_message.cpp
  78. <8 kyu> Remove First and Last Character - Solution: string_remove_first_last_char.cpp
  79. <8 kyu> Reversed Strings - Solution: string_reverse.cpp
  80. <8 kyu> String repeat - Solution: string_repeat.cpp
  81. <8 kyu> Sum Arrays - Solution: sum_arrays.cpp
  82. <8 kyu> Sum of positive - Solution: positive_sum.cpp
  83. <8 kyu> Third Angle of a Triangle - Solution: third_angle_triangle.cpp