NeoGenCode Technologies Pvt. Ltd.

Interview Questions for NeoGenCode Technologies Pvt. Ltd.

1. Write a program to get the index and its value from an array. For example, if arr = ["o", "s", "m", "b", "a"], the expected result is res = {0: "o", 1:"s", 2:"m", 3:"b", 4:"a"}.

2. Write a function to check if a given string is a palindrome or not.

3. Write a program to count the occurrences of each character in a string. For example, given the string 'aaabacbdac', the expected result is {'a': 5, 'b': 2, 'c': 2, 'd': 1}.