coding

222 Articles 3 Followers


C Kata - Convert a Number to string!

10 Oct 2022 1 minute read 0 comments Lochard

Learning from YayoDrayber, I am sharing my CodeWars Kata.   DESCRIPTION We need a function that can transform a number (integer) into a string. What ways of achieving this do you know? In C, return a dynamically allocated string that will be freed by...

Why computers can’t represent 0.3 accurately

4 Oct 2022 1 minute read 0 comments 4rkal

Most people know that adding up 0.1 + 0.2 equals 0.3. However computers represent it as 0.30000000000000004 . Here is a screenshot of it in python3 Your first thought might be that this is just some kind of error. Well its not Why is that? Fractions...

C Kata - Double Char

2 Oct 2022 1 minute read 0 comments Lochard

Learning from YayoDrayber, I am sharing my CodeWars Kata.   DESCRIPTION: Given a string, you have to return a string in which each character (case-sensitive) is repeated once.   Examples (Input -> Output): * "String" -> "SSttrriinngg" * "Hello World...

JavaScript Kata #41: Sentence Smash

30 Sep 2022 2 minute read 0 comments YayoDrayber

If you missed the introductory post, it's here. For a list of previously solved katas, please refer to the bottom of this page. If this is your first time seeing my post, please note - these katas are probably randomly assigned per user so please don...

JavaScript Kata #40: Factorial Factory

25 Sep 2022 3 minute read 0 comments YayoDrayber

If you missed the introductory post, it's here. For a list of previously solved katas, please refer to the bottom of this page. If this is your first time seeing my post, please note - these katas are probably randomly assigned per user so please don...

C Kata - Find the smallest integer in the array

23 Sep 2022 1 minute read 0 comments Lochard

Learning from YayoDrayber, I am sharing my CodeWars Kata.   DESCRIPTION: Given an array of integers your solution should find the smallest integer.   For example: Given `[34, 15, 88, 2]` your solution will return `2` Given `[34, -345, -1, 100]` your...

JavaScript Kata #39: Equal Sides Of An Array

22 Sep 2022 5 minute read 0 comments YayoDrayber

If you missed the introductory post, it's here. For a list of previously solved katas, please refer to the bottom of this page. If this is your first time seeing my post, please note - these katas are probably randomly assigned per user so please don...

C++ Kata - Reversed Strings

21 Sep 2022 1 minute read 0 comments Lochard

Learning from YayoDrayber, I am sharing my CodeWars Kata which could also be a reference for myself in the future.   This is the same as the last Kata but in C++. I switch to C++ because Publish0x doesn't have highlight for Rust.   DESCRIPTION: Comp...

JavaScript Kata #38: Highest and Lowest

20 Sep 2022 2 minute read 0 comments YayoDrayber

If you missed the introductory post, it's here. For a list of previously solved katas, please refer to the bottom of this page. If this is your first time seeing my post, please note - these katas are probably randomly assigned per user so please don...

Rust Kata - Reversed Strings

19 Sep 2022 1 minute read 0 comments Lochard

Learning from YayoDrayber, I am sharing my CodeWars Kata which could also be a reference for myself in the future.   DESCRIPTION: Complete the solution so that it reverses the string passed into it. 'world' => 'dlrow' 'word' => 'drow' Starting c...