Basic algorithms and data structures.
Sorting Dates Input:
In the first line: the number of elements of the input set (N). In the next N lines: dates to sort (format dd-mm-yyyy).
Heap Commands:
'v': add a number v to the heap '-': remove the maximum from the max heap (minimum from the min heap respectively) and write it on the screen 'p': write all elements of the heap in the order in which they are stored in an array 'r': n v1 ...vn (remove all elements from the heap and create a heap out of n new elements, of the values given by v1 ...vn)' 's': change the orientation of the heap – from max to min or from min to max; s operation can be requested multiple times 'q': exit the program
Hashtable input:
The text (any number of words with only lower case letters, separated by spaces or new line characters). The words starting with character '?' and '-', and the word "q" are interpreted as commands:
'?': print the number of occurences of the given word on the screen, '-': remove the information about the given word from the hash table 'q': exit.
BST Commands:
'+': add a new element with a given key to the tree, '+': remove an element with a given key from the tree (ignore this operation if there is no such an element in the tree), '?': search the tree for an element with a given key, write '1' if the element was found, or '0' if not, 'm': write the key of the minimum element in the tree, 'M': write the key of the maximum element in the tree, 'q': quit the program.