C Program Using String Manipulation Leetcode Javascript