摘要: 前言 之前写过一个多进程异步服务系统的小项目,里面对于多个进程之间使用的负载均衡算法。就是最简单的轮询办法,但是这种算法存在一个比较大的问题,如果其中一个服务器出现问题,那下一个服务器的负载会增大两倍。基于这个问题我这几天在看Go语言高级编程的书的时候,发现作者写了有关于负载均衡的章节,因此这里拿来 阅读全文
posted @ 2019-08-12 21:07 GoodRnne 阅读(299) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: Example 1: Example 2: Example 3: A 1 AA 26+ 阅读全文
posted @ 2019-06-11 15:52 GoodRnne 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function 阅读全文
posted @ 2019-06-09 15:18 GoodRnne 阅读(127) 评论(0) 推荐(0) 编辑
摘要: A peak element is an element that is greater than its neighbors.Given an input array nums, where nums[i] ≠ nums[i+1], find a peak element and return i 阅读全文
posted @ 2019-06-08 16:03 GoodRnne 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to in 阅读全文
posted @ 2019-06-07 20:19 GoodRnne 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). F 阅读全文
posted @ 2019-06-06 10:06 GoodRnne 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Example 1: E 阅读全文
posted @ 2019-06-05 15:59 GoodRnne 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 索引在mysql中的作用主要是在海量数据中快速查找到指定的数据。在设计数据表格的时候应该对列添加索引也是一个重要的问题,因为这决定了在查找数据时查找速度,当然数据很大时,设计不好的索引不仅不能加速查找,反而会变得更加慢。因此设计一个好的索引是非常重要的一个问题,但是怎么的索引的才是一个好索引?这就需 阅读全文
posted @ 2019-06-05 15:23 GoodRnne 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Sort a linked list using insertion sort. Example 1: Example 2: 阅读全文
posted @ 2019-06-04 11:48 GoodRnne 阅读(469) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the preorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iterativel 阅读全文
posted @ 2019-06-02 17:17 GoodRnne 阅读(425) 评论(0) 推荐(0) 编辑