摘要:
Given a string s , find the length of the longest substring t that contains at most 2 distinct characters. Example 1: Input: "eceba" Output: 3 Explana 阅读全文
摘要:
Given an array of unique integers, arr, where each integer arr[i] is strictly greater than 1. We make a binary tree using these integers, and each num 阅读全文
摘要:
There are buckets buckets of liquid, where exactly one of the buckets is poisonous. To figure out which one is poisonous, you feed some number of (poo 阅读全文
摘要:
You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a double booking. A double booking h 阅读全文
摘要:
Given an array nums, partition it into two (contiguous) subarrays left and right so that: Every element in left is less than or equal to every element 阅读全文
摘要:
There are n dominoes in a line, and we place each domino vertically upright. In the beginning, we simultaneously push some of the dominoes either to t 阅读全文
摘要:
A string s is called good if there are no two different characters in s that have the same frequency. Given a string s, return the minimum number of c 阅读全文
摘要:
Given a string s, return the number of palindromic substrings in it. A string is a palindrome when it reads the same backward as forward. A substring 阅读全文
摘要:
You are given two m x n binary matrices grid1 and grid2 containing only 0's (representing water) and 1's (representing land). An island is a group of 阅读全文
摘要:
order and str are strings composed of lowercase letters. In order, no letter occurs more than once. order was sorted in some custom order previously. 阅读全文