随笔分类 -  Hash

摘要:[抄题]: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters 阅读全文
posted @ 2018-04-25 21:06 苗妙苗 阅读(105) 评论(0) 推荐(0)
摘要:[抄题]: Given a string, determine if a permutation of the string could form a palindrome. For example,"code" -> False, "aab" -> True, "carerac" -> True. 阅读全文
posted @ 2018-04-25 16:32 苗妙苗 阅读(81) 评论(0) 推荐(0)
摘要:[抄题]: Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between i and j  阅读全文
posted @ 2018-04-25 15:47 苗妙苗 阅读(133) 评论(0) 推荐(0)
摘要:[抄题]: You are given a data structure of employee information, which includes the employee's unique id, his importance value and his directsubordinates 阅读全文
posted @ 2018-04-24 21:49 苗妙苗 阅读(136) 评论(0) 推荐(0)
摘要:[抄题]: Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy 阅读全文
posted @ 2018-04-24 17:07 苗妙苗 阅读(155) 评论(0) 推荐(0)
摘要:[抄题]: Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more lett 阅读全文
posted @ 2018-04-24 16:08 苗妙苗 阅读(223) 评论(0) 推荐(0)
摘要:[抄题]: 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 阅读全文
posted @ 2018-04-24 10:49 苗妙苗 阅读(589) 评论(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 occ 阅读全文
posted @ 2018-04-23 23:55 苗妙苗 阅读(153) 评论(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)
摘要:[抄题]: 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 苗妙苗 阅读(118) 评论(0) 推荐(0)
摘要:原版 sorted [抄题]: [思维问题]: 存sum - nums[i](补集),若出现第二次则调出 [一句话思路]: hashmap中,重要的数值当做key,角标当做value. [画图]: [一刷]: [总结]: [复杂度]:n/n [英文数据结构,为什么不用别的数据结构]: 2根指针 n^ 阅读全文
posted @ 2017-12-13 16:24 苗妙苗 阅读(264) 评论(0) 推荐(0)