Skip to content
#

Data structures

A data structure is a particular way storing and organizing data in a computer for efficient access and modification. Data structures are designed for a specific purpose. Examples include arrays, linked lists, and classes.

Here are 7,138 public repositories matching this topic...

javascript-algorithms
leetcode
azl397985856
azl397985856 commented Nov 11, 2019

给定两个由小写字母构成的字符串 A 和 B ,只要我们可以通过交换 A 中的两个字母得到与 B 相等的结果,就返回 true ;否则返回 false 。

 

示例 1:

输入: A = "ab", B = "ba"
输出: true
示例 2:

输入: A = "ab", B = "ab"
输出: false
示例 3:

输入: A = "aa", B = "aa"
输出: true
示例 4:

输入: A = "aaaaaaabc", B = "aaaaaaacb"
输出: true
示例 5:

输入: A = "", B = "aa"
输出: false
 

提示:

0 <= A.length <= 20000
0 <= B.length <= 20000
A 和 B 仅由小写字母构成。

来源:力扣(L

grandyang
grandyang commented May 30, 2019

The i-th person has weight people[i], and each boat can carry a maximum weight of limit.

Each boat carries at most 2 people at the same time, provided the sum of the weight of those people is at most limit.

Return the minimum number of boats to carry every given person.  (It is guaranteed each person can be carried by a boat.)

Example 1:

Input: people = [1,2], limit 
ceki
ceki commented Nov 19, 2019

It's not easy to understand what the code generators under jctools-build are supposed to do. I think one or two phases documenting their goal would be useful.

I am proposing to document these classes:

  • JavaParsingAtomicArrayQueueGenerator.java
  • JavaParsingAtomicLinkedQueueGenerator.java
  • JavaParsingAtomicQueueGenerator.java
benji
benji commented Dec 8, 2019

Currently the user has to provide a specific port even when creating a client. The problem is that there is no reliable way to get an available port.

The tests are either:

  • hardcoding the ports - the test fails if another service is already using that port
  • using NettyMessagingServiceTest#findAvailablePort which is prone to race conditions

More generally when using Atomix clients it is

Wikipedia
Wikipedia

Related Topics

algorithm
You can’t perform that action at this time.