KartikSubstrings, time complexity and total number of substringsString (n) — n*(n+1)/2 Time Complexity — O(n2) Space Complexity — O(n2) — All the substring combined.Apr 30Apr 30
KartikLongest Ideal SubsequenceYou are given a string s consisting of lowercase letters and an integer k. We call a string t ideal if the following conditions are…Apr 26Apr 26
KartikValid Parenthesis StringGiven a string s containing only three types of characters: ‘(‘, ‘)’ and ‘*’, return true if s is valid.Apr 7Apr 7
KartikMinimum Remove to Make Valid ParenthesesGiven a string s of ‘(‘, ‘)’ and lowercase English characters.Apr 7Apr 7
KartikSubarrays with K Different IntegersGiven an integer array nums and an integer k, return the number of good subarrays of nums.Mar 30Mar 30
KartikReverse Linked ListGiven the head of a singly linked list, reverse the list, and return the reversed list.Mar 21Mar 21
KartikMiddle of the Linked ListGiven the head of a singly linked list, return the middle node of the linked list.Mar 7Mar 7
KartikFind the Town JudgeIn a town, there are n people labeled from 1 to n. There is a rumor that one of these people is secretly the town judge.Feb 25Feb 25
KartikBitwise AND of Numbers RangeGiven two integers left and right that represent the range [left, right], return the bitwise AND of all numbers in this range, inclusive.Feb 21Feb 21