|
- algorithm - Fastest way to search for an element in unsorted array . . .
This could be solved by using some tricks In an unsorted array simly if we traverse through it, the complexity in worst case (when element is present at last index) would be O (N), where N is the size of array So, here is the trick First check the last index so that if the element is present at last index (the worst case) our code will be executed in O (1) and after that while the code to
- What are some algorithms for comparing how similar two strings are?
What you're looking for are called String Metric algorithms There a significant number of them, many with similar characteristics Among the more popular: Levenshtein Distance : The minimum number of single-character edits required to change one word into the other Strings do not have to be the same length Hamming Distance : The number of characters that are different in two equal length
- What is the algorithm to compute the Amazon-S3 Etag for a file larger . . .
Just to clarify, the issue isn't that the ETag algorithm somehow changes if the file is over 5GB The ETag algorithm is different for non-multipart uploads and for multipart uploads You'd run into the same problem trying to calculate the ETag of a 6MB file if it were uploaded using one 5MB part and one 1MB part MD5 is used for non-multipart uploads, which are capped at 5GB The algorithm in
- Whats the fastest algorithm for sorting a linked list?
1 As I know, the best sorting algorithm is O (n*log n), whatever the container - it's been proved that sorting in the broad sense of the word (mergesort quicksort etc style) can't go lower Using a linked list will not give you a better run time
- algorithm - Bellman-Ford vs Dijkstra: Under what circumstances is . . .
76 After a lot of Googling, I've found that most sources say that the Dijkstra algorithm is "more efficient" than the Bellman-Ford algorithm But under what circumstances is the Bellman-Ford algorithm better than the Dijkstra algorithm? I know "better" is a broad statement, so specifically I mean in terms of speed and also space if that applies
- Image comparison - fast algorithm - Stack Overflow
Each algorithm is best suited for certain types of image transformations and you can take advantage of that At the top, the fastest algorithms; at the bottom the slowest (though more accurate) You might skip the slow ones if a good match is found at the faster level file-hash based (md5,sha1,etc) for exact duplicates
- algorithm - Peak signal detection in realtime timeseries data - Stack . . .
Robust peak detection algorithm (using z-scores) I came up with an algorithm that works very well for these types of datasets It is based on the principle of dispersion: if a new datapoint is a given x number of standard deviations away from a moving mean, the algorithm gives a signal The algorithm is very robust because it constructs a separate moving mean and deviation, such that previous
- What algorithm can be used for packing rectangles of different sizes . . .
What algorithm can be used for packing rectangles of different sizes into the smallest rectangle possible in a fairly optimal way?
|
|
|