[LeetCode] 24. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list’s nodes (i.e., only nodes themselves may be changed.) Exampl 2020-04-12 #leetcode #java #javascript #linked list
[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 #sliding window #prefix sum
[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] 201. Bitwise AND of Numbers Range Given two integers left and right that represent the range [left, right], return the bitwise AND of all numbers in this range, inclusive. Example 1:Input: left = 5, right = 7Output: 4 Exampl 2020-03-25 #leetcode #java #javascript #bit manipulation