摘要: According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John 阅读全文
posted @ 2017-12-03 14:35 jasminemzy 阅读(431) 评论(1) 推荐(0) 编辑
摘要: Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list 阅读全文
posted @ 2017-12-03 13:37 jasminemzy 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leadin 阅读全文
posted @ 2017-12-03 12:45 jasminemzy 阅读(142) 评论(0) 推荐(0) 编辑
摘要: A 2d grid map of m rows and n columns is initially filled with water. We may perform an addLand operation which turns the water at position (row, col) 阅读全文
posted @ 2017-12-03 11:22 jasminemzy 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. get(key) - Get the 阅读全文
posted @ 2017-12-03 09:18 jasminemzy 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation -- it e 阅读全文
posted @ 2017-12-03 07:16 jasminemzy 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Given two sentences words1, words2 (each represented as an array of strings), and a list of similar word pairs pairs, determine if two sentences are s 阅读全文
posted @ 2017-12-03 06:05 jasminemzy 阅读(334) 评论(0) 推荐(0) 编辑
摘要: Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given 阅读全文
posted @ 2017-12-03 05:02 jasminemzy 阅读(145) 评论(0) 推荐(0) 编辑