Skip to content

mahmoodhamdi/codewars-kata-solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CodeWars Kata Solutions

A collection of CodeWars Kata solutions written in Dart, showcasing problem-solving skills through coding challenges organized by difficulty level.

CodeWars Profile Dart License

🗂️ Solutions

Solutions are grouped by difficulty level (kyu) in directories named after each Kata.

8kyu

7kyu

  • Flick Switch: Toggle a boolean value based on "flick" occurrences in a list.
  • Largest 5 Digit Number: Find the largest 5-digit number from consecutive digits in a string.
  • Highest and Lowest: Find the highest and lowest numbers in a string of space-separated numbers.
  • Sum of odd numbers: Calculate the sum of the numbers in the nth row of this triangle (starting at index 1).
  • Vowel Count: Count the number of vowels in a string.
  • Get the Middle Character: Get the middle character(s) of a string.
  • Mumbling: Create a string where each character is repeated according to its index.
  • Indexed capitalization: Given a string and an array of integers representing indices, capitalize all letters at the given indices.

6kyu

  • Split Strings: Split a string into pairs of characters, adding '_' to the last if odd length.
  • Who likes it?: Determine who likes a post based on the number of names.
  • Valid Braces: Determine if a string contains valid matching parentheses.
  • Bonuses: fair bonuses of all employees in the same order as their numbers of days of absences.
  • Roman Numerals Decoder: Decode a Roman numeral string into an integer.
  • Build a pile of Cubes: Calculate the number of cubes needed to build a pile of cubes with a given volume.
  • Alex & snooker: points earned.: Calculate the points earned in a snooker game based on the number of balls potted.
  • Mexican Wave: Create a "wave" effect in a string by capitalizing each letter in turn.

5kyu

  • Josephus Permutation: Solve the Josephus problem by finding the last person remaining after eliminating every k-th person in a circle.
  • Perimeter of squares in a rectangle: Calculate the perimeter of squares that can fit inside a rectangle with given dimensions(fibonacci).
  • RGB To Hex Conversion: Convert an RGB color to a hexadecimal color.
  • Weight for weight: Sort a list of strings based on the sum of the digits in each string, with ties broken by lexicographical order.

4kyu

3kyu

More Katas coming soon!

📖 About

This repository contains solutions to CodeWars challenges, written in Dart for clean, efficient code. It’s perfect for learning Dart, preparing for interviews, or enjoying coding puzzles. Each solution includes comments and test cases.

📜 License

Licensed under the MIT License.

🙌 Acknowledgments

  • CodeWars for a great platform.
  • Built with ❤️ using Dart.

Happy coding! Give a ⭐ if you find this helpful!