There were 2 questions asked.
The question was to find length of the shortest substring contains all letters from A to Z as subsequence. Variation of Min Window Substring (https://leetcode.com/problems/minimum-window-substring/), change was instead of t, a string consisting of all letters from A to Z were given. Both s and t strings were of upper case.
Given a number M, find it's power of 2, let's say N = Math.pow(2,M) . Keep on doing sum of all digits of N till N is a single digit number. return N. The problem I faced here is constraint on M. M was given from 0 to 10^5. I want to know which data type in Java(as I gave it in Java) could hold it?
Seemed to be a variation of Happy Number(https://leetcode.com/problems/happy-number/)