Question Approach1 TimeComplexity: O() SpaceComplexity: O() Approach2 TimeComplexity: O() SpaceComplexity: O()