题目
Longest Valid Parentheses
Given a string containing just the characters ‘(‘ and ‘)’, find the length of the longest valid (well-formed) parentheses substring.
Example 1:
1 | |
Example 2:
1 | |
Longest Valid Parentheses
Given a string containing just the characters ‘(‘ and ‘)’, find the length of the longest valid (well-formed) parentheses substring.
Example 1:
1 | |
Example 2:
1 | |
LongestSubstringWithoutRepeatingCharacters
Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Example 1:
1 | |
Example 2:
1 | |
Example 3:
1 | |
AddTwoNumbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the number 0 itself.
Example:
1 | |
Boyer Moore Majority Vote Algorithm
MajorityElementII
Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times.
Note: The algorithm should run in linear time and in O(1) space.
Example 1:
1 | |
Example 2:
1 | |
Update your browser to view this website correctly.&npsb;Update my browser now