Tagged Questions

the algorithmic problem of ordering a set of elements with respect to some ordering relation.

23 views

Sort an array based on dependencies

I have an array of objects, each of them has a numeric id and another array attached to them. The array in the object contains the dependencies of that object. Each dependency is an id from the other ...
20 views

Use of sorting in counterexamples for equations

I came across a question which asked how sorting would help in searching for counterexamples to the conjecture that $$u^6 + v^6 + w^6 + x^6 + y^6 = z^6$$ has no non trivial solutions in integers. The ...
65 views

Online sorting without modifications

There is an array with $n$ places. There is a stream of $n$ unique numbers that arrive at a random order (permutation selected uniformly at random). Whenever a number arrives, we must put it ...
34 views

Generalized sorting algorithm on partially ordered set generated by a relation

Assume we have a finite set $X$ of elements and any relation $\preceq$ on $X$. Such a relation may or may not generate a reflexive transitive anti-symmetric relation $\leq$ on $X$ (a partial order). ...
26 views

Is there a standard recently-used algorithm based on time and usage count?

Everyone is familiar with most recently used files lists in software and in OSs like Windows. Some programs just sort by time. I've always been fairly annoyed at this. Others like Windows take usage ...
59 views

On the fly manipulation of operators

Assume that you are writing sorting algorithms, and that you want the ability to select between ascending and descending order. The only change required to do this for comparison sorts is to use the ...
64 views

32 views

Get the previous and next values of a string in lexicographic order [closed]

I'm working with a noSQL database and for certain reasons I can't use equality filtering in my queries e.g select all from database where id = 10 is NOT ...
41 views

merge sort merge phase

I'm watching a video, demonstrating merge sort, https://www.youtube.com/watch?v=EeQ8pwjQxTM At 5:42, happens something I do not understand. We are merging last 2 big arrays, ...
84 views