Second interview programming tasks:
1) Given a string you need to calculate amount of words in it, words can be separated with one or multiple spaces
2) Given a string you need to calculate amount of spaces and next line symbols in it
3) Given array of integers you need to find max subarray sum and indexes of elements forming that sum, ex: [7, -9, 7, 5], mas subarray sum: 12, indexes of elements: 2,3
4) Given a string you need to create two algorithms for odd and even length of the string which will find longest palindrome in that string
5) You need to write your own implementation of double linked list, it should have methods add, remove and indexOf