Absolutely one of my favorite problems. The counting valleys problem is about a hiker who records his steps. The output must be to count the number of valleys the hiker walked through. Two things we had to keep in mind were: A mountain is a sequence of consecutive steps above sea level, starting with a step up from sea level and… Continue reading Counting Valleys
Tag: python
Sales by Match
This was the very first problem I solved in Hackerrank. I did not have any idea about algorithms. I didn’t learn algorithms in school either. What I learned was how to create a class, a function, edit an HTML, all the basics. I was amazed at the first time I encountered a runtime error because… Continue reading Sales by Match