摘要:
[抄题]: 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 bijection between a 阅读全文
摘要:
[抄题]: 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 阅读全文
摘要:
[抄题]: Count the number of prime numbers less than a non-negative number, n. [暴力解法]: 时间分析: 空间分析: [优化后]: 时间分析: 空间分析: [奇葩输出条件]: [奇葩corner case]: [思维问题]: 阅读全文
摘要:
[抄题]: 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 阅读全文
摘要:
[抄题]: 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 阅读全文
摘要:
[抄题]: 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 阅读全文
摘要:
[抄题]: 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 阅读全文
摘要:
[抄题]: 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 阅读全文
摘要:
[抄题]: Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from two different arrays (each array picks one) a 阅读全文
摘要:
[抄题]: Given an array of integers nums, write a method that returns the "pivot" index of this array. We define the pivot index as the index where the s 阅读全文