HackerRank Customer Service Capacity

Hi, today I would like to show you how to solve the code puzzle with the time line. Where you have to in O(n) determine how many maximal events happen the same time… I hope you like it ;-). I looked on the Internet and there is no correct solution for this problem in my opinion, so far. So I decided to write on my own this solution and share with my readers… On the Internet there Continue ReadingHackerRank Customer Service Capacity

Binary Tree Visible Nodes Counting

Hi, today I would like to share with you solution of the code puzzle with binary tree. There are 2 trees examples t1 and t2 and your job is to find visible nodes and visible nodes are that are not smaller then all parents. When you go down for t1 tree you can find 4 such visible nodes. And for the second tree there are 2 nodes that are visible. Important thing is that the root node Continue ReadingBinary Tree Visible Nodes Counting