摘要: Search in Rotated Sorted Array (M) 题目 Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5 阅读全文
posted @ 2020-06-25 05:42 墨云黑 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Longest Valid Parentheses (H) 题目 Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parenth 阅读全文
posted @ 2020-06-25 04:03 墨云黑 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Next Permutation (M) 题目 Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such a 阅读全文
posted @ 2020-06-25 01:38 墨云黑 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Substring with Concatenation of All Words (H) 题目 You are given a string, s, and a list of words, words, that are all of the same length. Find all star 阅读全文
posted @ 2020-06-24 11:18 墨云黑 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Divide Two Integers (M) 题目 Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Retur 阅读全文
posted @ 2020-06-24 04:27 墨云黑 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Implement strStr() (E) 题目 Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 阅读全文
posted @ 2020-06-24 02:43 墨云黑 阅读(90) 评论(0) 推荐(0) 编辑
摘要: Remove Element (E) 题目 Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extr 阅读全文
posted @ 2020-06-24 02:00 墨云黑 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Remove Duplicates from Sorted Array (E) 题目 Given a sorted array nums, remove the duplicates in-place such that each element appear only once and retur 阅读全文
posted @ 2020-06-24 01:38 墨云黑 阅读(90) 评论(0) 推荐(0) 编辑
摘要: Nim Game (E) 题目 You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to re 阅读全文
posted @ 2020-06-23 07:31 墨云黑 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Word Pattern (E) 题目 Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijec 阅读全文
posted @ 2020-06-23 04:32 墨云黑 阅读(106) 评论(0) 推荐(0) 编辑