Skip to content
#

data-structure

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 670 public repositories matching this topic...

wnesensohn
wnesensohn commented May 23, 2016

Selection Sort, for example, makes the algorithm look extremely (impossibly) good at first glance - O(n) - because it's not showing the majority of the steps.

Instead of

    for (var j = i + 1; j < D.length; j++) {
        if (D[j] < D[minJ]) {
            tracer._select(j);
            minJ = j;
            tracer._deselect(j);
        }
    }

it has to be more like

    for (var j
TheSuperNoob
TheSuperNoob commented Mar 2, 2020

Is there a reason why in travis CI config the command black --check . || true is run? I don't see the point in checking if files needs to be reformatted if it's just going to be ignored anyways.

Currently running black --line-length 127 --check . -> 399 files would be reformatted, 74 files would be left unchanged.

In additio

danielchang-Z
danielchang-Z commented Sep 30, 2018

A pleasure that LinkedHashMap has been added.

While I have a different point about the iterative sequence. The sequence should order by the key last time put in instead of the first time put in.

This situation is caused by the func named LinkedHashMap.Put:

// Put inserts key-value pair into the map.
// Key should adhere to the comparator's type assertion, otherwise method panics.
fu
cemerick
cemerick commented Mar 31, 2020

CCList prints list contents within the provided start/stop strings without a box:

https://github.com/c-cube/ocaml-containers/blob/d34b7588b028f3618cc44d3f4c6417295db586c8/src/core/CCList.ml#L1821-L1823

which means that the indentation of list items doesn't take the start string's length into account, e.g.

[[`Binding ((Name "box")), 
`Rule 18, 
`Rule 20], ...]

If a box were

frnsskk
frnsskk commented Aug 16, 2019

I'm currently making a Rust port of IPFS log, and I noticed that the docstring return values in log-sorting.js are incorrect:

  1. It is claimed @returns {number} 1 if a is greater, -1 if b is greater when actually it is the other way around.
  2. SortByClocks is claimed to return 1 or -1 (in the manner stated above), but in reality it returns the time difference between the two clocks, which ca
Wikipedia
Wikipedia

Related Topics

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