摘要:
[抄题]: 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 occ 阅读全文
posted @ 2018-04-23 23:55
苗妙苗
阅读(152)
评论(0)
推荐(0)
摘要:
[抄题]: Count the number of prime numbers less than a non-negative number, n. [暴力解法]: 时间分析: 空间分析: [优化后]: 时间分析: 空间分析: [奇葩输出条件]: [奇葩corner case]: [思维问题]: 阅读全文
posted @ 2018-04-23 22:13
苗妙苗
阅读(382)
评论(0)
推荐(0)
摘要:
[抄题]: Given two strings s and t, write a function to determine if t is an anagram of s. For example,s = "anagram", t = "nagaram", return true.s = "rat 阅读全文
posted @ 2018-04-23 21:12
苗妙苗
阅读(123)
评论(0)
推荐(0)
摘要:
[抄题]: Given two lists Aand B, and B is an anagram of A. B is an anagram of A means B is made by randomizing the order of the elements in A. We want to 阅读全文
posted @ 2018-04-23 16:28
苗妙苗
阅读(95)
评论(0)
推荐(0)
摘要:
[抄题]: You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizonta 阅读全文
posted @ 2018-04-23 15:35
苗妙苗
阅读(120)
评论(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 阅读全文
posted @ 2018-04-23 10:37
苗妙苗
阅读(107)
评论(0)
推荐(0)
摘要:
[抄题]: You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in Sis a type of 阅读全文
posted @ 2018-04-23 09:35
苗妙苗
阅读(117)
评论(0)
推荐(0)