Questions tagged [array]
An array is an ordered data structure consisting of a collection of elements (values or variables), each identified by one (single dimensional array, or vector) or multiple indexes.
2,134 questions
5
votes
1
answer
216
views
ObjectBucketSort.java with running time statistics
Intro
This time, I present the ObjectBucketSort, a stable sorting algorithm for objects.
Code
...
7
votes
3
answers
990
views
Batcher's sort in C++20
Intro
This is the very first time I actually expose myself to C++20 (concepts in this case). I decided to rewrite the Batcher's sort.
(This post has a continuation: Batcher's sort in C++20 - Take II.)
...
6
votes
1
answer
662
views
Batcher's sort in Java: a θ(N log N log N) sorting algorithm
Intro
This time I have implemented the Batcher's sort.
Code
io.github.coderodde.util.BatchersSort.java:
...
2
votes
2
answers
270
views
Benchmarking in Java some super linearithmic sorting algorithms
Intro
A sort is called super linearithmic if its running time is \$\omega(N \log N)\$. For example, \$f(N) = \omega(g(N))\$ means that \$f(N)\$ grows "faster" than \$g(N)\$. In this post, I ...
2
votes
0
answers
198
views
Indexing into Nested Data Structures in VBA
Project
I have created a VBA module called Idx which you may find here on GitHub. It is inspired by pluck() and ...
1
vote
0
answers
148
views
Collection Utilities for VBA
Background
I am building a complex, standalone class. It has a property called .Mapping, which should behave like a Dictionary.
...
2
votes
2
answers
209
views
Affect a repetition of an argument N times (for array construction)
Consider the following (C++20) function (from the solution to this StackOverflow question):
...
2
votes
1
answer
107
views
RAII Wrapper For CUDA Pointers
I was recently working on my CUDA wrappers library, and this particular class is one of the oldest pieces of code in the entire project. Since that time, I added tons of other features (for example <...
4
votes
2
answers
137
views
Implementing views and slicing for arbitrarily nested `std::vector`s in a header-only library
I implemented a templated vector_view class that holds a reference to an std::vector and provides the following operations:
...
2
votes
1
answer
137
views
Swift: Find neighbor-elements within an array
I need a function which finds the left and right neighbor-element within an integer-array, based upon a given index. If the given element is 0, then it shall return largest index as left neighbor. ...
14
votes
5
answers
2k
views
I implemented FFT in C
I wrote Cooley-Tukey's FFT algorithm in C. And I want to know how safe is this code? Is it just trash? How can I make it more memory safe?
...
3
votes
1
answer
82
views
Ruby Array#own_uniq method
I have implemented my own version of Ruby's Array uniq-method (Ruby docs - Class array) as a monkey patch on Array.
Method-impl.:
...
2
votes
1
answer
142
views
IndexedLinkedList.java - A fast list data structure for large data, Take V/V (the finger list)
Intro
This post is all about so called finger list, which is a data structure for speeding up the
linked-list operations.
Code
...
4
votes
2
answers
267
views
Ruby Array#own_shuffle method
I have tried to implement the Array-shuffle method myself. Haven't had a look on some similar algorithm-examples by purpose and tried to figure out something myself.
The actual Array-extension:
...
1
vote
0
answers
47
views
Identifies connected elements and faces in FE mesh
So I'm conscious that this is a weak appeal for best practices. I'm building a converter that moves generic FE meshes to an inhouse edge format in Fortran and at some point I made a truly diabolical ...