LeetCode 161. One Edit Distance
Description https://leetcode.com/problems/one-edit-distance/ Given two strings s and t, return true if they are both one edit distance apart, otherwise return false. A string s is said to be…
Be a Good Techer and Tech for Good. www.goodtecher.com
Description https://leetcode.com/problems/one-edit-distance/ Given two strings s and t, return true if they are both one edit distance apart, otherwise return false. A string s is said to be…
Description https://leetcode.com/problems/binary-string-with-substrings-representing-1-to-n/ Given a binary string s (a string consisting only of ‘0’ and ‘1’s) and a positive integer n, return true if…
Description https://leetcode.com/problems/find-k-length-substrings-with-no-repeated-characters/ Given two strings s and goal, return true if you can swap two letters in s so the result is equal to goal, otherwise, return false. Swapping…
Description https://leetcode.com/problems/find-k-length-substrings-with-no-repeated-characters/ Given a string s, return the number of substrings of length k with no repeated characters. Example 1: Input: s =…
Description https://leetcode.com/problems/count-substrings-with-only-one-distinct-letter/ Given a string s, return the number of substrings that have only one distinct letter. Example 1: Input: s = “aaaba” Output:…
Description https://leetcode.com/problems/largest-odd-number-in-string/ You are given a string num, representing a large integer. Return the largest-valued odd integer (as a string) that is a non-empty substring of num,…
Description https://leetcode.com/problems/largest-substring-between-two-equal-characters/ Given a string s, return the length of the longest substring between two equal characters, excluding the two characters. If there…
Description https://leetcode.com/problems/longest-palindrome/ Given a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with…
Description https://leetcode.com/problems/baseball-game/ You are keeping score for a baseball game with strange rules. The game consists of several rounds, where…
Description https://leetcode.com/problems/check-if-word-equals-summation-of-two-words/ The letter value of a letter is its position in the alphabet starting from 0 (i.e. ‘a’ -> 0, ‘b’ -> 1, ‘c’ -> 2,…