1037. Valid Boomerang

作者:sryan 更新时间:2021-02-03 16:51 分类:数据结构与算法

A boomerang is a set of 3 points that are all distinct and not in a straight line. Given a list of t...

点击数:358 回复数:0

1033. Moving Stones Until Consecutive

作者:sryan 更新时间:2021-02-03 15:57 分类:数据结构与算法

Three stones are on a number line at positions a, b, and c. Each turn, you pick up a stone at an end...

点击数:361 回复数:0

1030. Matrix Cells in Distance Order

作者:sryan 更新时间:2021-02-03 15:21 分类:数据结构与算法

We are given a matrix with R rows and C columns has cells with integer coordinates (r, c), where 0 &...

点击数:334 回复数:0

1022. Sum of Root To Leaf Binary Numbers

作者:sryan 更新时间:2021-02-03 14:17 分类:数据结构与算法

You are given the root of a binary tree where each node has a value 0 or 1. Each root-to-leaf path r...

点击数:331 回复数:0

1021. Remove Outermost Parentheses

作者:sryan 更新时间:2021-02-02 18:50 分类:数据结构与算法

A valid parentheses string is either empty (""), "(" + A + ")", or A +...

点击数:383 回复数:0

1018. Binary Prefix Divisible By 5

作者:sryan 更新时间:2021-02-02 17:36 分类:数据结构与算法

Given an array A of 0s and 1s, consider N_i: the i-th subarray from A[0] to A[i] interpreted as a bi...

点击数:340 回复数:0

1013. Partition Array Into Three Parts With Equal Sum

作者:sryan 更新时间:2021-02-02 17:18 分类:数据结构与算法

Given an array of integers arr, return true if we can partition the array into three non-empty parts...

点击数:334 回复数:0

1009. Complement of Base 10 Integer

作者:sryan 更新时间:2021-02-02 10:46 分类:数据结构与算法

Every non-negative integer N has a binary representation. For example, 5 can be represented as &quot...

点击数:346 回复数:0

关于TCP Keepalive

作者:sryan 更新时间:2021-01-27 18:20 分类:计算机网络

最近在分析应用接入的一个奇怪现象。我负责了一个服务端,开放一个端口提供服务。中间由类似于LVS的四层负载提供LB服务。 在服务端模拟网络异常,由于LVS有超时机制,会中断两个方向的连接,同时中断之后不...

点击数:465 回复数:0

1005. Maximize Sum Of Array After K Negations

作者:sryan 更新时间:2021-01-14 18:51 分类:数据结构与算法

Given an array A of integers, we must modify the array in the following way: we choose an i and repl...

点击数:441 回复数:0