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.
0
votes
0answers
23 views
Random field from password
I have seen log in pages where the page asks for random field from your password. For example, enter the second, fifth and first character from your password. And if you refresh the page it will ask ...
-3
votes
1answer
43 views
Efficient way to copy unordered String into ordered String
I'm doing this in Hadoop Java where I'm reading a String. The string is huge that has been tokenized and put in an array.
It has key-value pairs but they are not in any order. I want this order to be ...
0
votes
1answer
17 views
Big-theta bounds, algorithmic analysis
I'm trying to learn how to find the big-theta bounds of various algorithms, but I'm having a hard time understanding how to do it, even after reading a number of questions here and lectures and ...
0
votes
0answers
17 views
How to represent 0 value data in mosaic plot?
I have a problem with a mosaic plot implementation. Actually my program works properly for data sets that does not consist 0 value. I read a lot about mosaic plot drawing techniques buts it is ...
0
votes
1answer
21 views
Grouping anagrams
Given array of words, group the anagrams
IP:{tar,rat,banana,atr}
OP:{[tar,rat,atr],[banana]}
One solution to this question using Hash Table. consider each word, sort it and add as key to hash table ...
0
votes
2answers
35 views
How to Generate Permutations With Repeated Characters
I basically want to create strings that consist of three operation symbols (eg: +-* or ++/ or +++). Each one of these strings should be pushed into vector <string> opPermutations
This is my code ...
0
votes
6answers
39 views
Algorithm to search through and delete repeats in array
I have an array with some elements being "repeats", and I want to delete repeats in the array.
So for example, the list (array) on the left turns into the array on the right:
Ingredients: ...
0
votes
1answer
19 views
File System with compression table across files
I studied lempel ziv compression algorithm in school.
The basic idea is to maintain a table of commonly occurring bit sequences and assign a unique symbol to each.
I was wondering if a file system ...
0
votes
1answer
30 views
Algorithm for counting n-element subsets of m-element set divisible by k
Suppose {1, 2, 3, ..., m} is a set. I choose n distinct elements from this set. Can I write an algorithm which counts the number of such subsets whose sum is divisible by k (ordering not mattering)?
...
0
votes
1answer
27 views
Returning the most similar bit signature from a prefix tree in python
I never coded with python before (I'm a java coder) and I'm looking at code that says it returns the most similar bit signature/vector in a prefix tree. The signature could be for example like this ...
0
votes
1answer
60 views
Discarding isolated pairs of points
I have a a list of a million pairs of integers (a,b). How can I prepare a data structure in python with the following property? When I see a new pair of integers I would like to be able to tell if ...
-2
votes
1answer
16 views
Matchup/Tournament Algorithm Sequence needs to be translated to code
A1,B1,A2,B2,A3,B3,A4,B4
1,7,4,6,2,8,3,5
A1 vs B3, A4 vs B2, A2 vs B4, A3 vs B1
Is there an algorithm for the sequence above? It would replicate for 8,16,32,64, and 128 participants also, the ...
-3
votes
2answers
69 views
Generating one permutation of a string
I'm reading this paper (page 3 and page 8): http://acl.ldc.upenn.edu/P/P05/P05-1077.pdf where it defines a permutation function to generate a permutation of a signature. The signature is a string of ...
0
votes
0answers
28 views
Issues in finding residuals of AR model
Assuming a noiseless AR(1) process y(t)= a*y(t-1) . I have following conceptual questions and shall be glad for the clarification.
Q1 - Discrepancy between mathematical formulation and ...
-4
votes
3answers
58 views
Recursion and iteration efficiency [on hold]
The actual question is this:
A) Iteration extensively uses stack memory.
B) Threaded Binary Trees use the concept of iteration.
C)Iterative function calls consumes a lot of memory.
D) Recursion is ...