摘要: 先来看一下都有哪些题目: 如何从大量的 URL 中找出相同的 URL?(百度) 如何从大量数据中找出高频词?(百度) 如何找出某一天访问百度网站最多的 IP?(百度) 如何在大量的数据中找出不重复的整数?(百度) 如何在大量的数据中判断一个数是否存在?(腾讯) 如何查询最热门的查询串?(腾讯) 如何 阅读全文
posted @ 2020-07-07 11:45 鸭子船长 阅读(424) 评论(0) 推荐(0) 编辑
摘要: (一)112题 题目地址:https://leetcode-cn.com/problems/path-sum/description/ 题目描述:给定一个二叉树和一个目标和,判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和。 解决方案: /** * Definition 阅读全文
posted @ 2020-07-07 11:32 鸭子船长 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 背景:这几天在看《高性能Mysql》,在看到创建高性能的索引,书上说mysql的存储引擎InnoDB采用的索引类型是B+Tree,那么,大家有没有产生这样一个疑问,对于数据索引,为什么要使用B+Tree这种数据结构,和其它树相比,它能体现的优点在哪里? 看完这篇文章你就会了解到这些数据结构的原理以及 阅读全文
posted @ 2020-07-07 10:55 鸭子船长 阅读(233) 评论(0) 推荐(0) 编辑
摘要: At a lemonade stand, each lemonade costs `$5`. Customers are standing in a queue to buy from you, and order one at a time (in the order specified by b 阅读全文
posted @ 2020-07-07 10:32 鸭子船长 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://leetcode.com/problems/gas-station/ There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You 阅读全文
posted @ 2020-07-07 10:28 鸭子船长 阅读(182) 评论(0) 推荐(0) 编辑