上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 17 下一页
摘要: 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 @ 2017-03-05 20:30 wilderness 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 统计小于n的素数的个数 如果判断每一个数是不是素数的话,时间会超时,如下 题意要统计素数的个数,那么可以换一种思路,每发现一个素数i,那么i^2,i^2+i...都肯定不是素数 阅读全文
posted @ 2017-03-05 19:41 wilderness 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 转载自leetcode评论区:https://discuss.leetcode.com/topic/30941/here-is-a-10-line-template-that-can-solve-most-substring-problems I will first give the soluti 阅读全文
posted @ 2017-03-05 11:09 wilderness 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example,S = "ADOBECOD 阅读全文
posted @ 2017-03-05 11:07 wilderness 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating 阅读全文
posted @ 2017-03-05 08:49 wilderness 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege 阅读全文
posted @ 2017-03-05 00:03 wilderness 阅读(159) 评论(0) 推荐(0) 编辑
摘要: A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy 阅读全文
posted @ 2017-03-04 22:13 wilderness 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, every element appears twice except for one. Find that single one. 找出一个数组中唯一一个只出现了一次的数,其余的都出现了两次 阅读全文
posted @ 2017-03-04 20:56 wilderness 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree [1,null,2,3], return [1,3,2]. 题意:中序遍历树 先写一种比较蠢的方 阅读全文
posted @ 2017-03-04 20:31 wilderness 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given a Weather table, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates. For example, ret 阅读全文
posted @ 2017-03-04 12:24 wilderness 阅读(204) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 17 下一页