Given a string S, write a program to find the first non-repeating character in it and return it's index.
- If non-repeating character doesn't exist, return -1.
- You may assume the string contain only lowercase letters.
Input: S = "afteracademy" Output: 1
Input: S = "mindorks" Output: 0
Input: S = "abacdcd" Output: -1