上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页
摘要: 解题思路:每次去掉目标字符串的末尾一个字符,这边要设置一个方向变量,这样就可以用双指针法来代替翻转字符串的操作,时间复杂度O(target.length())。 阅读全文
posted @ 2017-04-25 11:49 Tsunami_lj 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 存储器不仅能存放数据,而且也能存放指令,在形式上,两者没有区别,但计算机应能区分数据还是指令 控制器应能自动取出指令来执行 运算器应能进行加减乘除四种基本运算,并且也能进行一些逻辑运算和附加运算 操作人员可以通过输入设备、输出设备和主机进行通信 阅读全文
posted @ 2017-04-23 14:33 Tsunami_lj 阅读(854) 评论(0) 推荐(0) 编辑
摘要: Design and implement a data structure for Least Frequently Used (LFU) cache. It should support the following operations: get and put. get(key) - Get t 阅读全文
posted @ 2017-04-19 23:13 Tsunami_lj 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Implement a basic calculator to evaluate a simple expression string. The expression string contains only non-negative integers, +, -, *, / operators a 阅读全文
posted @ 2017-04-17 18:11 Tsunami_lj 阅读(100) 评论(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-04-14 15:53 Tsunami_lj 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Design a data structure that supports all following operations in average O(1) time. Note: Duplicate elements are allowed. Example: ["RandomizedCollec 阅读全文
posted @ 2017-04-11 20:06 Tsunami_lj 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Design a data structure that supports all following operations in average O(1) time. Example: 阅读全文
posted @ 2017-04-10 21:19 Tsunami_lj 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Shuffle a set of numbers without duplicates. Example: 阅读全文
posted @ 2017-04-10 20:19 Tsunami_lj 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z. 阅读全文
posted @ 2017-04-10 17:12 Tsunami_lj 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. The update(i, val) function modifies nums by upd 阅读全文
posted @ 2017-04-10 16:28 Tsunami_lj 阅读(105) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页