CNoodle
  • Home
  • Archives
  • Tags
  • About

[LeetCode] 424. Longest Repeating Character Replacement

You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can perform this operation at most k times. Return the
2020-04-04
#leetcode #two pointer #hashmap #java #javascript #sliding window #string

[LeetCode] 209. Minimum Size Subarray Sum

Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to target. If there is no such subarray, return 0 ins
2020-04-03
#leetcode #array #two pointer #java #javascript #prefix sum #sliding window

[LeetCode] 438. Find All Anagrams in a String

Given two strings s and p, return an array of all the start indices of p’s anagrams in s. You may return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a
2020-04-03
#leetcode #two pointer #hashmap #java #javascript #sliding window #string

[LeetCode] 159. Longest Substring with At Most Two Distinct Characters

Given a string s, return the length of the longest substring that contains at most two distinct characters. Example 1:Input: s = “eceba”Output: 3Explanation: The substring is “ece” which its leng
2020-04-03
#leetcode #two pointer #hashmap #java #javascript #sliding window #string

[LeetCode] 340. Longest Substring with At Most K Distinct Characters

Given a string s and an integer k, return the length of the longest substring of s that contains at most k distinct characters. Example 1:Input: s = “eceba”, k = 2Output: 3Explanation: The s
2020-04-03
#leetcode #two pointer #hashmap #java #javascript #sliding window #string

[LeetCode] 3. Longest Substring Without Repeating Characters

Given a string s, find the length of the longest substring without repeating characters. Example 1:Input: s = “abcabcbb”Output: 3Explanation: The answer is “abc”, with the length of 3. Example 2:
2020-04-03
#leetcode #two pointer #hashmap #java #javascript #sliding window #string

[LeetCode] 76. Minimum Window Substring

Given two strings s and t of lengths m and n respectively, return the minimum windowsubstring of s such that every character in t (including duplicates) is included in the window. If there is no such
2020-04-03
#leetcode #two pointer #hashmap #java #javascript #sliding window #string

[LeetCode] 419. Battleships in a Board

Given an m x n matrix board where each cell is a battleship ‘X’ or empty ‘.’, return the number of the battleships on board. Battleships can only be placed horizontally or vertically on board. In othe
2020-04-01
#leetcode #array #java #binary search

[LeetCode] 1002. Find Common Characters

Given a string array words, return an array of all characters that show up in all strings within the words (including duplicates). You may return the answer in any order. Example 1:Input: words =
2020-03-31
#leetcode #array #hashmap #java

[LeetCode] 999. Available Captures for Rooks

You are given an 8 x 8 matrix representing a chessboard. There is exactly one white rook represented by ‘R’, some number of white bishops ‘B’, and some number of black pawns ‘p’. Empty squares are rep
2020-03-27
#leetcode #array #java #matrix #simulation
1…3334353637…44

Search

Hexo Fluid