1. Given a sorted array nums, remove the duplicates in-place such that each element appears only once and returns the new length.
2. Explain encapsulation with real-life examples.
3. Given an integer x, return true if x is a palindrome, and false otherwise.