Given two strings str1 and str2, find if str1 is a subsequence of str2. A subsequence is a sequence that can be derived from another sequence by deleting
python list
3 Articles
3
C Programming – Replace all ‘0’ with ‘5’ in an input Integer – Mathematical Algorithms – The idea is simple, we get the last digit using mod operator ‘%’.
PYTHON Program Count 1’s in a sorted binary array – Searching and Sorting – A simple solution is to linearly traverse the array. The time complexity of the simple solution is O(n). We can use Binary Search to find count in O(Logn) time.