摘要: 题目描述 Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2 阅读全文
posted @ 2019-11-01 10:07 3/8 阅读(79) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr 阅读全文
posted @ 2019-09-23 14:58 3/8 阅读(250) 评论(0) 推荐(0) 编辑
摘要: Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc 阅读全文
posted @ 2019-09-23 11:46 3/8 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runti 阅读全文
posted @ 2019-09-23 11:17 3/8 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Given an array of strings, group anagrams together. Example: All inputs will be in lowercase. The order of your output does not matter. 解法: 首先遍历输入,同时对 阅读全文
posted @ 2019-09-23 11:14 3/8 阅读(88) 评论(0) 推荐(0) 编辑
摘要: LeetCode 1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each 阅读全文
posted @ 2019-09-23 10:53 3/8 阅读(86) 评论(0) 推荐(0) 编辑
摘要: LeetCode 383. Ransom Note https://leetcode.com/problems/ransom-note/ 原题地址 题目描述 Given an arbitrary ransom note string and another string containing let 阅读全文
posted @ 2019-09-15 17:26 3/8 阅读(196) 评论(0) 推荐(0) 编辑