"Largest Product in a Series"
So, this problem was in the Project Euler Contest of HackerRank, it was an easy level problem, but I think that it would be a challenging one is we don't understand the basic concepts of string manipulation. It also required a concept of using ASCII values to convert a char to int, which is normally a big headache in cpp, well most of the things are in cpp...well, we had to find the greatest product of consecutive terms in a string, and output it at the end of every Test Case.
Basically we had to get a range every time to get the product and then every time check with the max element as always, it's a very common practice to get a max elem, most of the novices must also be well aware about finding the max of a list. The tricky part was just the setting of range for the inner loop and making it dynamic, well things would have been much easier in Python but... it's fine!
I couldn't do much today, started my lectures on networking, did duo, something like 4 problems from HackerRank, mostly solved using cpp, did some revision of algos, but I couldn't get my SQL practice, and missed the Sections too. Well tommorrow's plan would be to do those things on priotity and yeah, practice the priority queue too.
Comments
Post a Comment