Task: Define the function that takes two parameters (dictionaries as default). Without modifying original dictionaries return the new one that includes all key and value pairs
however, if key repeats itself, then add values
a = {'a': 5, 'b': 1, 'c': -1, 'd': 1}
b = {'a': 1, 'b': 5, 'c': 1, 'e': 1}
solution = {'a': 6, 'b': 6, 'c': 0, 'd': 1, 'e': 1}
Task: merge and sort two ordered lists
list_a = [8, 10, 12, 44, 63, 66]
list_b = [2, 3, 20, 106, 144]
solution = [2, 3, 8, 10, 12, 20, 44, 63, 66, 106, 144]
This morning for the interviewed person we had a short algorithmic task. Given n = 5, create a list of multiplied integers:
[1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]
My little tour on Python Web Shops is over for now. It has been an excellent chance to see what is going on in the town. I have been applying mainly for a web developer position. Below is a list of few interview questions I have got. I will answer the most interesting or ones that require more in-depth research in the next articles.