LeetCode 解题报告 (32)-- 最长合法的子括号串
原题如下:
>Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.
原题如下:
>Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.
原题如下:
>Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.
原题如下:
>You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and without any intervening characters.
据说这是面试中被问频率非常高的一个问题,下面做简单的记录:
Java 中的 java.util.Iterator
和 java.util.Enumeration
均可用来遍历 Java 中的集合框架(list,map,set 等)。
原题如下:
>Divide two integers without using multiplication, division and mod operator.
If it is overflow, return MAX_INT.
原题如下:
>Given an array and a value, remove all instances of that value in place and return the new length.
Do not allocate extra space for another array, you must do this in place with constant memory.
LeetCode 解题报告 (26)-- 消除有序数组中重复值 (常数空间)
原题如下:
>Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in place with constant memory.
LeetCode 解题报告 (23)-- 合并 k 个有序数组
原题如下:
>Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.LeetCode 解题报告 (22)-- 生成所有合法的嵌套括号
原题如下:
>Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
0%