Maybe some of you may wonder why lately I wasn’t posting any algorithm, or maybe not. But, I feel the compelling need to explain You the reason behind this behavior! Well, I’m working on my combinatorics book, which just happen to be a very demanding one, and it takes all my free time and free energies. […]
Algorithms
Magic paths!
Hi! There are lot of problems related with finding the shortes or the longest path in graph, most of them using forms of DFS,BFS or in case of weighted graph using the Dijkstra algorithm, Bellman-Ford or one of the many other. Let’s see one of those problem: Given a weighted –no negative weights– connected graph […]
Counting bits! A lot of bits!
Hello! Tomorrow is an important day for me and I promised to myself that I will just chill all the day before, you know in order to keep the mind clean and fresh.. But.. I found this interesting problem and you know what, let’s work it out 🙂 The problem is: You’re given two numbers […]
Smart sorting
Hello everybody! I can say it now since I gained two followers! Unfortunately it just happen that I know who those two people are and for one of them I was forced to a little bit of lobbying in order to have her following me, but nevertheless I’m obliged from now on to welcome EVERYBODY […]
Combinatorics masturbation
I dont want to make the impression that today at work I’m bored as hell, but, probably that’s the reason why I’m writing this post instead of working on my task in order to have something to say at the tomorrow daily meeting –yep, we have DAILY meetings twice a week in our personal SCRUM piece […]
Sherlock and MiniMax
This is a problem from HackerRank, is not a complex problem but i think the solution is interesting for the way approach the problem. I will present here at first two versions of the algorithm, one have O(n^2) complexity and the second O(nlogn). I have also a O(n) solution which i need to analyze better, […]