first checkin the code structure for leetcode answer