上一页 1 2 3 4 5 6 ··· 18 下一页
摘要: Given an integer n, return 1 - n in lexicographical order. For example, given 13, return: [1,10,11,12,13,2,3,4,5,6,7,8,9]. Please optimize your algori 阅读全文
posted @ 2018-07-12 17:13 Pickle 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 有趣的位运算 计算机的终极程序其实只有0和1,转化成集成电路的低电压和高电压来进行存储和运算。如果你是计算机相关专业出身或者是一名软件开发人员即使不对计算机体系结构如数家珍,至少也要达到能够熟练使用位运算的水平,要不然还是称为代码搬运工比较好:),位运算非常简单,非常容易理解而且很有趣,在平时的开发 阅读全文
posted @ 2018-04-18 08:08 Pickle 阅读(2421) 评论(5) 推荐(20) 编辑
摘要: Maven是Java中最常用的依赖管理工具,Maven的中央仓库保罗万象,涵盖了各个领域的框架、工具和文档,也是Java生态强大生命力的体现。我们自己开发的一些有用有趣的代码也可以通过打包上传到maven中央仓库的方式分享给他人,也为开源社区做了贡献。本文记录了上传bloomfilter算法实现代码 阅读全文
posted @ 2018-04-06 16:09 Pickle 阅读(6053) 评论(2) 推荐(1) 编辑
摘要: On a horizontal number line, we have gas stations at positions stations[0], stations[1], ..., stations[N-1], where N = stations.length. Now, we add K  阅读全文
posted @ 2018-03-26 16:40 Pickle 阅读(517) 评论(0) 推荐(0) 编辑
摘要: Overview HashMap是Java编程中最常用的数据结构之一,本文基于JDK1.8从源码角度来分析HashMap的存储结构和常用操作。HashMap实现了Map接口,Map接口的实现类还有Hashtable、LinkedListHashMap和TreeMap。具体的继承结构请参考JDK Do 阅读全文
posted @ 2018-02-27 14:25 Pickle 阅读(1022) 评论(3) 推荐(3) 编辑
摘要: 前言 随着比特币的起起伏伏,区块链技术越来越受到关注。区块链和比特币是当下和人工智能一样风靡的领域。人们开始寻找区块链技术的用武之地,已经有了不少的尝试。但是区块链的价值所在众说纷纭,特别是一些媒体胡乱吹嘘或者是故意贬低,给大家都带来了不小的困惑。其实作为一名技术人员只需要理解其底层实现原理和运行机 阅读全文
posted @ 2018-02-23 19:43 Pickle 阅读(4589) 评论(4) 推荐(11) 编辑
摘要: Given a Binary Search Tree (BST) with root node root, and a target value V, split the tree into two subtrees where one subtree has nodes that are all 阅读全文
posted @ 2018-02-07 17:48 Pickle 阅读(1045) 评论(0) 推荐(0) 编辑
摘要: You are given a data structure of employee information, which includes the employee's unique id, his importance value and his directsubordinates' id. 阅读全文
posted @ 2018-01-18 19:37 Pickle 阅读(254) 评论(0) 推荐(0) 编辑
摘要: A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0, 128 阅读全文
posted @ 2017-12-05 11:05 Pickle 阅读(443) 评论(0) 推荐(0) 编辑
摘要: Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there ar 阅读全文
posted @ 2017-10-22 17:05 Pickle 阅读(179) 评论(0) 推荐(0) 编辑
摘要: You are given a string representing an attendance record for a student. The record only contains the following three characters: A student could be re 阅读全文
posted @ 2017-10-19 10:43 Pickle 阅读(159) 评论(0) 推荐(0) 编辑
摘要: The Employee table holds all employees. Every employee has an Id, and there is also a column for the department Id. The Department table holds all dep 阅读全文
posted @ 2017-09-18 18:16 Pickle 阅读(358) 评论(0) 推荐(0) 编辑
摘要: X city built a new stadium, each day many people visit it and the stats are saved as these columns: id, date, people Please write a query to display t 阅读全文
posted @ 2017-09-14 14:03 Pickle 阅读(1394) 评论(0) 推荐(0) 编辑
摘要: Mary is a teacher in a middle school and she has a table seat storing students' names and their corresponding seat ids. The column id is continuous in 阅读全文
posted @ 2017-09-14 13:50 Pickle 阅读(1069) 评论(0) 推荐(0) 编辑
摘要: There is a table courses with columns: student and class Please list out all classes which have more than or equal to 5 students. For example, the tab 阅读全文
posted @ 2017-09-13 19:34 Pickle 阅读(346) 评论(0) 推荐(0) 编辑
摘要: X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a poster indicating the movies’ ratings and descrip 阅读全文
posted @ 2017-09-13 18:49 Pickle 阅读(294) 评论(0) 推荐(0) 编辑
摘要: Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and m values (i.e., change all f values to m and vice ver 阅读全文
posted @ 2017-09-13 18:42 Pickle 阅读(350) 评论(0) 推荐(0) 编辑
摘要: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文
posted @ 2017-09-01 18:18 Pickle 阅读(172) 评论(0) 推荐(0) 编辑
摘要: You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contai 阅读全文
posted @ 2017-09-01 18:00 Pickle 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Given an m * n matrix M initialized with all 0's and several update operations. Operations are represented by a 2D array, and each operation is repres 阅读全文
posted @ 2017-09-01 11:39 Pickle 阅读(284) 评论(0) 推荐(0) 编辑
摘要: Given an 2D board, count how many battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. You may ass 阅读全文
posted @ 2017-08-28 15:21 Pickle 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the 阅读全文
posted @ 2017-08-23 14:46 Pickle 阅读(348) 评论(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-08-23 13:44 Pickle 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the ave 阅读全文
posted @ 2017-08-22 11:15 Pickle 阅读(384) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array consisting of only integers where every element appears twice except for one element which appears once. Find this single element 阅读全文
posted @ 2017-08-18 10:53 Pickle 阅读(168) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 18 下一页