All Posts

Leetcode 3: Longest Substring Without Repeating Characters

Given a string, determine the length of the longest substring that contains no repeating characters. The substring must consist of consecutive characters, and its length is to be returned as the output.

Leetcode 209: Minimum Size Subarray Sum

Given an array of positive integers and a target value, find the minimal length of a contiguous subarray whose sum is greater than or equal to the target. If no such subarray exists, return 0.

Leetcode 395: Longest Substring with At Least K Repeating Characters

Given a string s and an integer k, return the length of the longest substring of s such that the frequency of each character in this substring is greater than or equal to k. If no such substring exists, return 0.

Leetcode 424: Longest Repeating Character Replacement

You are given a string s consisting of uppercase English letters and an integer k. You can change any character in the string to any other uppercase English character, but you are allowed to perform this operation at most k times. The goal is to find the length of the longest substring that contains the same letter after performing at most k character changes.

Leetcode 438: Find All Anagrams in a String

You are given two strings, s and p. Return the list of start indices of all the anagrams of string p in string s. An anagram of p is a rearrangement of the characters of p, and the start indices should be returned in any order.

Leetcode 567: Permutation in String

Given two strings s1 and s2, return true if s2 contains any permutation of s1 as a substring, otherwise return false. In other words, check if one of the permutations of s1 exists as a substring within s2.