This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://www.hackerrank.com/challenges/equal-stacks/problem | |
| # You have three stacks of cylinders where each cylinder has the same diameter, but they may | |
| # vary in height. You can change the height of a stack by removing and discarding its topmost | |
| # cylinder any number of times. | |
| # Find the maximum possible height of the stacks such that all of the stacks are exactly the | |
| # same height. This means you must remove zero or more cylinders from the top of zero or more | |
| # of the three stacks until they're all the same height, then print the height. The removals | |
| # must be performed in such a way as to maximize the height. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://www.hackerrank.com/challenges/contacts/problem | |
| # We're going to make our own Contacts application! The application must perform two types of operations: | |
| # 1. add name, where name is a string denoting a contact name. This must store name as a new contact in | |
| # the application. | |
| # 2. find partial, where partial is a string denoting a partial name to search the application for. It | |
| # must count the number of contacts starting with partial and print the count on a new line. | |
| # Given n sequential add and find operations, perform each operation in order. | |
| # INPUT FORMAT: | |
| # The first line contains a single integer, n, denoting the number of operations to perform. |