An algorithm is a sequence of well-defined steps that defines an abstract solution to a problem. Use this tag when your issue is related to algorithm design.

learn more… | top users | synonyms (2)

0
votes
0answers
17 views

Implementing Navigate Back and Navigate Forward button functionality for a WinForm TreeView control

I have a WinForm app that has a TreeView control in it that usually has many nodes and I would like to implement functionality like Visual Studio's Navigate Back and Navigate forward functionality. ...
3
votes
1answer
92 views

Sorting Technique Python

I'm trying to create a sorting technique that sorts a list of numbers. But what it does is that it compares two numbers, the first being the first number in the list, and the other number would be the ...
4
votes
3answers
49 views

Sort array of days in javascript

I have an array. The array can contain 1 to 7 unique strings of day names. The day names will be in order from Mon to Sun. - eg: ["Tue", "Thu", "Sun"] I want to use javascript to sort that array ...
0
votes
3answers
35 views

Sieve of Eratosthenes with Wheel Factorization

i'm implementing a reasonably fast prime number generator and i obtained some nice results with a few optimizations on the sieve of eratosthenes. In particular, during the preliminary part of the ...
0
votes
1answer
17 views

Convert freehand path to shape

I am trying to allow the user to draw a free hand shape, then using a best guess algorithm, convert the free hand to an actual shape. I hope to have it pretty simple at first. Probably just ellipses ...
0
votes
1answer
37 views

Find all paths of length 4

In igraph or networkx, what is the fastest way to find all simple paths in a directed graph of length 4? One way us to make a graph of a simple path of length 4 and use the subgraph isomorphism vf2 ...
0
votes
2answers
89 views

Big-O of this algorithm?

How can I describe the growth function in terms of n for the following algorithm? What is the bounding function (the Big-O)? Is it O(n^3)? for(i = 0 to n - 1) { c = i + 1 for(j = c to n) ...
1
vote
1answer
19 views

Connecting “paths” of a network of points into “routes”

I have a matrix called paths. paths = 1 2 1 3 1 4 2 3 2 5 3 4 3 5 Each element is the index of a 2D coordinate in matrix Crdnts. Each row of ...
0
votes
0answers
18 views

Choosing starting parameters for the Levenberg-Marquardt Algorithm on a Neural Net

I'm currently working on a project in which an ANN is being used. For the training algorithm, I selected LMA as it is fairly fast and versatile, and I read a paper which suggests it is the best ...
2
votes
1answer
21 views

Image sharpness metric

Is there some robust metric of image sharpness or bluriness? I have various set of images with different parameters of saturation and captured from different optical systems, and i heed to show user ...
0
votes
1answer
41 views

Efficient Method to Search in an Array where the maximum difference between previous and current element is 1

Array has property that an element in array can be equal , less than 1 or greater than 1 the previous element . e.g. 6,6,6,5,4,3,3,4,5,5. Better than O(N) solution needed as it is asked in the ...
0
votes
1answer
24 views

MySQL - will indexes speed up my search queries?

I have a table for patients in a hospital, so potentially over time this table could contain tens of thousands of rows. A hospital-unique ID number (BIGINT) is assigned to each patient which serves as ...
4
votes
1answer
48 views

Looking for a hint (not the answer) on how to return the longest acsending non contiguous substring when I already have the length

My code currently returns the length of the largest substring: for(int i = 1; i<=l-1;i++) { counter = 1; for(int j = 0; j<i;j++) { if(seq[j]<seq[j+1]) { ...
2
votes
2answers
47 views

Algorithm for simulating burst errors

I am wanting to simulate error bursts for my program but I am not sure how I would go about doing it. Let's say I have a fixed bit-error-rate of 2/10 and varying error-burst-lengths from 4 to 12 bits ...
-1
votes
1answer
58 views

The best String reconstruction algorithm out there ? (Best as in 'most accurate')

I've been searching and testing all kinds of string reconstruction algorithm i.e. reconstructing spaceless text into normal text. My result posted here Solution working partially in Ruby, is working ...

1 2 3 4 5 2100
15 30 50 per page