programming kata

1 minute read

Code kata

Problem Trolls are attacking your comment section! A common way to deal with this situation is to remove all of the vowels from the trolls’ comments, neutralizing the threat. Your task is to write a function that takes a string and return a new string with all vowels removed. For example, the string “This website is for losers LOL!” would become “Ths wbst s fr lsrs LL!”. Solution Solution 1 (defn disemvowel string) Solution 2 (defn disemvowel string)

1 minute read

Code kata

From today, I will practice one programming kata per day and post the content here. Here goes the first one: My friend John likes to go to the cinema. He can choose between system A and system B. System A : buy a ticket (15 dollars) every time System B : buy a card (500 dollars) and every time buy a ticket the price of which is 0.90 times the price he paid for the previous one.

5 minute read

Table of Contents 1. Problem 2. Analysis 3. Source Code 4. Build script 5. How to run I suck at algorithms, even though I have a Machine Learning and Algorithms master degree. It makes me frown everytime in coding interviews. So I decided to practice more often, hope that I can get better at it. At least not afraid of it. Now this is the first one.