In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning.

learn more… | top users | synonyms (1)

-1
votes
2answers
89 views

Store a tree with near next neighbours

I would to find an efficient structure (speed and volume) to store nodes and their neighbourhood. My input is build out of stings in the following format ./X/Y.log where X ∈ [0,359] and Y ...
-1
votes
0answers
78 views

Mechanism behind QR code scanning of whatsapp webapp [on hold]

I could not find any answers related to the working mechanism of qr code scanning used on whatsapp web-app. How does the authentication happen when the phone (any smartphone running whatsapp) scans ...
-1
votes
2answers
55 views

Find best layout to reduce use of space or material

Example case: You have a truck, that can hold 2.8m by 3.2m by 16m of storage capacity. You you get a bunch of physical objects you want to store in that truck. These objects are not always cubic, but ...
-1
votes
0answers
52 views

How to decompose strings into a list of its spelling in an efficent way?

I have the problem where I'm taking as input a string, for example "table python desk" and I wish to decompose the string in terms of its spelling. So I want to output "t ta tab tabl table p py pyt ...
-1
votes
0answers
41 views

Generating all the words accepted by a deterministic finite automaton [duplicate]

Imagine you've got a finite deterministic automaton A defining some finite regular language L, consisting of N words. The first question is: how would you determine the number of words N? Then, I ...
-1
votes
2answers
222 views

Programming judge with versus system [closed]

I'm looking for a programming judge system which supports putting contestants programs against each other in "matches". The format could be either for example a tournament style or chess ranking, but ...
-1
votes
1answer
24 views

RSS feed topic categorization

I'm trying to make my own news feed from CNN's RSS feed (among a dozen other news sources). However, I've come across a problem that is actually quite complex, at least that's what I think. One of ...
-2
votes
1answer
98 views

Find missing number in sequence in string [closed]

I have a string that contains numbers in sequence. There are no delimiters between numbers. I have to find missing number in that sequence. For example: 176517661768 is missing the number: 1767 ...
-2
votes
1answer
195 views

Pairing 40 people over 20 days such that no pair is the same twice or more [duplicate]

I'm trying to figure out what algorithm / method I can use to figure out how to pair people together such that the pairs aren't repeated i.e. if a unique individual is denoted by Px where x is their ...
-2
votes
1answer
849 views

using ant colony algorithm to create cross word game [closed]

I have difficulty to learn about ant colony algorithm (ACO), I have read about generating crossword game using (genetic algorithm) GA.I Know both of GA ant ACO usually used for optimization, but my ...
-2
votes
1answer
50 views

Considerations when making data structure and algorithm choices [closed]

What are some reasons you may choose a worse runtime algorithm? And what are some advantages of a linked list vs a hash table/array where access is constant time.
-2
votes
7answers
3k views

Which sorting algorithms have a different worst case complexity than their average case? [closed]

I'v been working on sorting for a while now but I can't figure these two questions apart, I'm kind of getting mixed up somewhere ... Somebody help a) Which sorting algorithms have a different worst ...
-2
votes
3answers
116 views

How to create an algorithm for a raffle, where each raffle guarantees a winning ticket?

I am looking for an algorithm to create a raffle, where each participant is assigned a ticket with a random series of numbers. Each raffle hast N participants, and there should exist same amount of ...
-2
votes
1answer
270 views

3D visualization of moment using accelerometer on Android device [closed]

Is it possible to reconstruct the movement of an Android device in 3D space using data from accelerometer? For example, I may draw a circle with my hand in the air, holding an Android device. Is ...
-2
votes
2answers
416 views

Which algorithm is faster? [closed]

I'm creating a small game, where the computer generate pseudo random number in give range, and the user have to guess it. I also made the option to play computer vs computer. I mean the computer ...
-2
votes
4answers
204 views

Algorithm/research on detecting language of text [closed]

I am interested in finding an approach that will detect what language a string of text is. As Google translate does.
-2
votes
2answers
315 views

About Artificial Intelligence [closed]

I am interested in starting a career in artificial intelligence. Can anyone suggest how I could prepare for this? What languages should I study that would be best for this career choice?
-2
votes
1answer
781 views

Grid Game Algorithm

Problem Link - http://www.iarcs.org.in/inoi/2009/zco2009/zco2009-1a.php You have to find the path with the maximum weight, from the top-left cell to the bottom-right cell. It could've been solved ...
-2
votes
1answer
83 views

Unable to Solve Dynamic Programming

I had an assignment on dynamic programming due last night, but I had to turn it in unfinished because i could not understand how to solve the last problem: The state wants to monitor traffic on a ...
-2
votes
2answers
480 views

Difference between O(N^2) and Θ(N^2) [duplicate]

What is the difference between O(N^2) and Θ(N^2)? I know that O is the upper bound and Θ is tight bound. Could someone explain me this concept with an example.
-2
votes
2answers
203 views

Counting digits of a decimal number

Is there an algorithm to count digits of a decimal number other than saving it as a string and then looping to find the decimal point and thus count the digits?
-2
votes
1answer
307 views

Program to look at the first say 5 characters of a word and return a string if that string is actually the first 5 characters of a word?

For example, say I have a string and it has the letters: RDNAL This is not an actual English word or it doesn't start an actual english word, so the program would skip this string and would avoid ...
-2
votes
1answer
282 views

Given a subset of numbers and subset of sums. Match the numbers to sums.(Harder than appears)

I'm not sure what the most efficent solution to this algorithm is. I'm not sure this fits exact cover, and approaching it via exhaustive backtracking seems somewhat inefficient. Any suggestions on how ...
-2
votes
0answers
24 views

UITableView addition SWIFT

I have a UITableView that lists items. Each item has a quantity and a price. The information is saved in the CoreData and I need to get the total of all items I managed to get the total only for each ...
-2
votes
1answer
72 views

Find largest subset where two elements share a property

I have a set of numbers S and I want to find the largest subset S' such that for any two elements x,y in S' property(x, y) == True in_relation(x,y) == True. How could I find it? Bruteforcing is an ...
-2
votes
1answer
194 views

Create arithmetic expression from number using +-/* that equals target [duplicate]

For example, you are given the source 1234 and the target 24. The task is to use the standard arithmetic operators +-/* placed within source, without changing the order of the digits of source to ...
-2
votes
1answer
682 views

Bresenham Vs Midpoint Circle drawing algorithm

Can somebody explain the difference between Bresenham and Midpoint Circle drawing algorithms? All I am able to understand is that in both algorithms we compute coordinates of an octant instead of ...
-2
votes
2answers
93 views

Find index of string in an array of strings where overlap could occur

I am having some trouble writing a variant of sub-string search. Essentially the goal is to write a method that can perform sub-string search except that the source data is in an array of Strings ...
-2
votes
1answer
77 views

Computer Algorithms for Polynomial Regression [closed]

Given a data set of arbitrary size, what algorithm would be appropriate for performing the polynomial regression on the data set such that the highest degree of the polynomial is n? If there are ...
-2
votes
1answer
2k views

get all the combination of a given set of numbers [duplicate]

I m trying to get the possible combinations of a given set of numbers say for example 123 The possible combinations would be 123 132 213 231 312 321 For this i have written a code as below - ...
-2
votes
1answer
188 views

Arranging the colors on the board in the most pleasing form [closed]

Given a rectangular board of height H and width W. N colors are given and each color occupies Xi percentage of area on the board. Sum of Xi's is 1. The colors on the board must be placed in ...
-2
votes
1answer
153 views

How to find complexity of T(n) = 8T(n/2)+n^2.93(log n)^93?

I believe we have to use a variant of master theorem...can someone suggest me how to find complexity of such equation which doesn't directly fit into Masters theorem.
-3
votes
1answer
181 views

Any Deterministic Compression Algorithms out There? [closed]

The title says it all, basically. Are there any deterministic compression algorithms - that is, an algorithm which, given identical input, will always produce identical output? As far as I know, ...
-3
votes
2answers
165 views

Integer Map Algorithm [closed]

For my project, I need to map integers so that inputting int X will output int Y where both X and Y are defined during runtime. I've used Dictionary<int,int> in .NET but its memory use is too ...
-3
votes
3answers
97 views

Link to ISO doc? Complexity of unordered_map operations in C++::stl [closed]

In different forums, I have found the statement that in C++::stl, insert and find for unordered_map have guaranteed amortized time complexity O(1). This puzzles me, and I would like to see the ...
-3
votes
4answers
209 views

Time complexity of this loop [duplicate]

Is the time complexity for this loop O(n) or O(log n)? for(i=0;i<n/2;i++){} I am thinking, the time is proportional with the input size.
-3
votes
0answers
59 views

Algorithm to fill a canvas with triangles [on hold]

Given a canvas say, 1000 X 1000 unit. I would like to fill the canvas with triangles. The triangles can be of any type right angle, equilateral...etc. To avoid big chunks of triangles lets say all ...
-3
votes
0answers
24 views

Making forest from shuffled nodes [closed]

I have shuffled nodes of a few trees. How to make trees from list of nodes? Each node has own key(hash) and key of parent. I we meet first parent and next child - we can use unordered map to find ...
-3
votes
1answer
82 views

complexity of an algorithm, sorting 5% out [duplicate]

I have been asked the following question.. An algorithm considers n elements, sorts 5% of n out, considers the remain elements(95%), sorts 5% of the remain elements, and so on until finally one last ...
-4
votes
1answer
586 views

Construct an array from an existing array

Given an array of integers A[1...n-1] where 'N' is the length of array A[ ]. Construct an array B such that B[i] = min(A[i], A[i+1], ..., A[i+K-1]), where K will be given. Array B will have ...