Unanswered Questions
351 questions with no upvoted or accepted answers
23
votes
0
answers
668
views
Multiplying big numbers using Karatsuba's method
The Karatsuba algorithm, first published in 1962, aims to speed up the multiplication of big numbers by reducing the number of 'single-digit-multiplications' involved.
Because of its complexity (...
9
votes
1
answer
386
views
Metropolis Monte Carlo Sampler in Rust
the following is an implementation of the standard Metropolis Hastings Monte Carlo sampler. You can read more about it here.
At the end I am going to give you a link to the Rust playground, so you ...
8
votes
0
answers
179
views
Implementing Simple Diff in Rebol
I've taken a crack at implementing Simple Diff in Rebol (versions 2 and 3). Simple Diff works by finding the longest common sequence in two series, then recursively applies itself either side of this ...
7
votes
0
answers
546
views
A* Algorithm in F#
Inspired by this post I looked up A* on wikipedia and went on with my own implementation as seen below where I try to mimic the pseudocode on Wikipedia but in a recursive manner.
I would like any ...
6
votes
0
answers
167
views
Efficiently generate distinct subsets which sum to a particular value
Related: Find all distinct subsets that sum to a given number
This code is supposed to efficiently generate all subsets of a list such that the subset's values sum to a particular target value. For ...
6
votes
0
answers
122
views
K nearest neighbours algorithm
Here is a project that I worked on for a few days in June 2020. Since the algorithm is extremely slow, I looked into methods in order to parallelize operations but did not obtain any satisfactory ...
6
votes
0
answers
271
views
Selection sort with reduced comparison count: Python iteration 2
Follow up to Selection sort with reduced comparison count - semi-final Iteration?
My goal (and excuse not to tag reinventing…) is to have presentable code to argue the viability of reducing the number ...
6
votes
0
answers
4k
views
Finding the length of arbitrary ASCII character strings
I have implemented this MIPS code to determine the length of given ASCII character strings.
Is there a simpler way to implement this code? Is there is a built-in function in MIPS?
Given String:
...
6
votes
0
answers
2k
views
Generic sliding window
The code implements fully generic sliding window with linear complexity. It should usually be paired with transforming iterator to reach full potential.
Sliding window is a grouping of elements by ...
6
votes
0
answers
873
views
Parsing Lua 5.2 strings with patterns
I wrote some code to parse Lua 5.2 strings in Lua 5.1, using patterns. It works perfectly as far as I tested.
...
6
votes
0
answers
643
views
Fowler–Noll–Vo hash function in Lua
I recently coded this FNV-1a hash function in Lua. Are there any apparent performance improvements that could be implemented?
...
6
votes
0
answers
423
views
Translating CFRM algorithm from Java to Clojure and improving performance
Counterfactual Regret Minimization is an algorithm that can be used to find the Nash Equilibrium for games of incomplete information. I have tried to adapt the exercise from here to Clojure. You can ...
6
votes
0
answers
453
views
Implementing recursive filters with Haskell/Repa
I recently learned Haskell, and I am trying to apply it to the code I use in order to get a feeling for the language.
I really like the Repa library since I manipulate a lot of multi-dimensional data....
5
votes
0
answers
106
views
Dial's heap in Java for integer priority queues
(The entire project is here.)
Intro
I have this priority queue data structure for non-negative integer priority keys. I recall that it is called Dial's heap.
Code
Implementation
...
5
votes
0
answers
817
views
A POSIX getdelim() and getline() implementation for MSVC
Tired of always having problems in reading arbitrary length lines from file under Windows, I tried to write a POSIX getdelim() and ...