Tagged Questions
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.
2
votes
5answers
135 views
Website Country Detection
I have a web crawler, and I'm looking for hints that will help me automatically detect a website country of origin.
And by country of origin I generally mean the country the website is targeting. For ...
5
votes
3answers
208 views
How to improve my algorithm skills using exercise? [closed]
Possible Duplicate:
Where can I find programming puzzles and challenges?
I'm trying to find some places with algorithmic exercise? Do you know any?
I found some:
Project Euler
Python ...
2
votes
0answers
83 views
What's the best way to learn nature-inspired algorithms?
I completed the Machine Learning course (Stanford) and got very interested, also after some research, I decided that I'd like to learn nature-inspired algorithms.
I've found some resources like:
...
0
votes
1answer
81 views
Good book to really learn to understand algorithms etc., preferably in C# [closed]
Possible Duplicate:
Is there a canonical reference on algorithm design?
I'm a decent enough C# programmer, but I have weak skills in math. Using the Khan Academy site to slowly build a ...
4
votes
3answers
104 views
Efficient graph clustering algorithm
I'm looking for an efficient algorithm to find clusters on a large graph (It has approximately 5000 vertices and 10000 edges).
So far I am using the Girvan–Newman algorithm implemented in the JUNG ...
-2
votes
0answers
52 views
Comparing two std::strings ignoring spaces and `\n` [closed]
With C++, how would I go about comparing two std::strings so that the following returns true:
withoutWhiteEqual(std::string("appl e\n sau ce")==std::string("applesauce");
7
votes
1answer
158 views
Why is a Bayes classifier used for spam filtering?
I've been reading about Bayesian spam filtering and I think I understand the theory, but I just don't see why this approach is needed in order to calculate the likelihood of a message being spam, ...
5
votes
3answers
230 views
what techniques can be used to implement Facebook's People You May Know feature?
I'm curious to learn from a technical perspective what techniques can be used to make recommendations for e.g. Facebook's "People You May Know" (what algorithm do they use, etc.)?
One of the things ...
7
votes
4answers
206 views
Is there a general method to evaluate the optimality of an optimization algorithm?
is there a general method to evaluate the optimality of an optimization algorithm, for example an algorithm solving an otherwise NP-hard or NP-complete problem?
The only method I came up so far is ...
4
votes
6answers
232 views
Find all points within a certain distance of each other?
Let's say, we have... 50k points randomly allocated in 3D space, according to some volumetric function, so that in some parts of the space, points are closer together, but in other parts, they are ...
-2
votes
1answer
151 views
How do I implement malloc effectively? [closed]
I recently had an interview where they asked me about implementing malloc.
I have 64 KB of memory and I can call malloc or free. In every call, malloc assigns 4 bytes. How can I implement the malloc ...
1
vote
2answers
84 views
Help on a Dynamic Programming definition in Cormen
I am reading about Dynamic Programming from Cormen.
In the beginning of the chapter it says (relating to the term Dynamic Programming):
"Programming” in this context refers to a tabular method, ...
4
votes
4answers
236 views
Simulating/developing_a_testing_strategy for factors that might cause the same algorithm to produce different results in Distributed Systems
This is a Purely Academic Question
Context:
I am working with some algorithms which are meant to arrive at a consensus in distributed systems. I intended to tackle Byzantine faults with these ...
2
votes
1answer
114 views
How to find Sub-trees in non-binary tree
I have a non-binary tree.
I want to find all "sub-trees" that are connected to root.
Sub-tree is a a link group of tree nodes.
every group is colored in it's own color.
What would be be the ...
2
votes
3answers
280 views
Algorithmic problem: Picking Cards
The problem below appeared on the last Code Sprint 2 programming competition (it's over already). The base cases are clear, but developing an algorithm that solves all possible cases has been a ...
-2
votes
0answers
44 views
algorithm to decompose graph vertices!
I am looking for a linear algorithm to decompose a graph vertices in to 2 set. one of sets most be independent set and another must be clique? Can you help me?
Is there any O(n+m) algorithm that n is ...
4
votes
5answers
241 views
How to handle large numbers?
Well, I've just started doing puzzles and it's so annoying to see puzzles which are easy to do but also need to handle very large numbers. That's the problem.
Say I have to deal with numbers like 10 ...
1
vote
1answer
118 views
What is the importance of algorithm design for a Java programmer? [closed]
Possible Duplicate:
Is there a canonical reference on algorithm design?
I am an aspiring core Java Programmer and I'm planning to get a job after passing the OCPJP exam for which I have ...
-5
votes
3answers
91 views
How do I get the whole picture? [closed]
I am having a tough time co-relating programming principles, programming languages, computer organization, architecture, networking, data structures and algorithms. Any books or other sources you ...
-4
votes
0answers
154 views
List of the most stunning algorithms [closed]
What is the most stunning algorithm you know? And by stunning I mean algorithm, which resembles pure magic for the unprepared programmer.
3
votes
5answers
338 views
Sort algorithms that work on large amount of data
I am looking for sorting algorithms that can work on a large amount of data, i.e. that can work even when the whole data set cannot be held in main memory at once.
The only candidate that I have ...
5
votes
3answers
134 views
Smallest lexicographical rotation of a string using suffix arrays in O(n)
I will quote the problem from ACM 2003:
Consider a string of length n (1 <= n <= 100000). Determine its minimum lexicographic rotation. For example, the rotations of the string “alabala” ...
-2
votes
1answer
69 views
How the operations work in a Binary Tree?
Search, Insert and Deletion. How those properties work in a Binary Tree? How much I read articles and all nothing worked, still I cannot understand it well. Please help me with this. I want to know it ...
0
votes
1answer
114 views
How Find operation works in a Binary Tree?
I am having a confusion in this Binary Tree Coding. I know the concept of binary tree and I know how those work and all, but in this source code i am confused with "Find" operation. I cannot ...
7
votes
5answers
286 views
Examples of general purpose algorithms that have benefited from running on a GPU?
I am looking for examples of general purpose algorithms (meaning non-graphics related) that have been proven to run an order of magnitude faster on a GPU than on a CPU. I will use these examples to ...
3
votes
3answers
79 views
Work load balance/Task distribution algorithm
I'm looking for an algorithm to either use or as a jump point for load balancing.
Environment:
We have ~7 job types that can be scheduled at any time by our users. Some jobs are fast, others are ...
-7
votes
1answer
110 views
Data Structures and Algorithms [closed]
I need to know the definitions for the methods of Binary Search Trees ..
Find , Search , Delete .. I want to know each and every method how it works and all simply.
1
vote
2answers
56 views
Concurrent Data Processing by Multiple People
Let's say I have a page, accessible by several people concurrently, that lists information that must be processed in some way by the user, after which it is either marked as "completed" and ...
-3
votes
1answer
73 views
Taking break for a month to study [closed]
is it a good idea to take breaks from work, say for two months, for studying. For example, I am becoming more and more interested in studying algorithms and I find day to day work distracting my ...
-1
votes
0answers
92 views
How do I smash graphs into simple cycles? [closed]
Possible Duplicate:
What is an algorithm to find simple cycles?
I have an Eulerian graph with more edges than vertices. So, an Eulerian cycle includes any vertex two and more times (that ...
2
votes
2answers
470 views
InterviewStreet (Vertical Sticks) just a tip where to get started
Having a lot of trouble with this question in interviewstreet.com:
Given array of integers Y=y1,...,yn, we have n line segments such that endpoints of segment i are (i, 0) and (i, yi). Imagine that ...
1
vote
3answers
129 views
What visualization method would you recommend for event driven programs?
What visualization method would you recommend for event driven programs? Are there industry standard diagrams, such as flowcharts?
3
votes
4answers
274 views
Building a route creator
Ok, already up front, I'm going to tell you, that this is a bonus task for Data structure course I'm taking. That should take care of all the questions whether or not this is for a homework.
Route ...
4
votes
3answers
264 views
What is an algorithm to find simple cycles?
I have a graph with an Eulerian cycle and no Hamiltonian cycles. I would like to divide this graph into simple cycles.
Edges may not be repeated in simple cycles.
How can this be done?
5
votes
7answers
284 views
What would be an appropriate algorithm to factorise numbers in the range of a few billion?
I'm learning Python at the moment and to give me reasons to apply what i'm learning I'm having a crack at some of the problems on Project Euler
I'm currently on number 3, which is to determine the ...
1
vote
4answers
226 views
Beginners guide to developing optimization software
I am novice in "serious" programming i.e. applications that deal with real-life applications and software projects that go beyond school assignments.
My interests include optimization, operations ...
0
votes
2answers
47 views
Determining whether two binary search trees have the same set of values
This is an interview question:
Given two Binary Search Trees, write a program to determine whether they contain the same set of values. Assume there are no duplicates.
My idea is to perform an ...
1
vote
1answer
82 views
looking for algorithmic challenges [closed]
Possible Duplicate:
Programming Puzzles
What are some good sources for coding challenges based entirely on devicing an algorithm (language agnostic) with challenges that increase in ...
6
votes
2answers
122 views
Data replication patterns / algorithms
I have a series of systems that need to be distributed to a variable number of nodes (at least two, but more likely 8 - 10). For performance reasons, any one piece of state needs to be maintained in ...
9
votes
7answers
481 views
Is there a subset of programs that avoid the halting problem
I was just reading another explanation of the halting problem, and it got me thinking all the problems I've seen that are given as examples involve infinite sequences. But I never use infinite ...
3
votes
3answers
178 views
Best beginners books for improving algorithms [closed]
Possible Duplicate:
Is there a canonical reference on algorithm design?
I an Electronics guy.. with a great interest on programming I am learning it myself. So, when ever I pick up a puzzle ...
3
votes
9answers
479 views
Does object-orientation really affect algorithm performance?
Object orientation has helped me a lot in implementing many algorithms. However, object-oriented languages sometimes guide you in "straightforward" approach and I doubt if this approach is always a ...
11
votes
12answers
873 views
How to write a command interpreter/parser?
Problem: Run commands in the form of a string.
command example:
/user/files/ list all;
equivalent to:
/user/files/ ls -la;
another one:
post tw fb "HOW DO YOU STOP THE TICKLE MONSTER?;"
...
0
votes
2answers
116 views
Worth of Algorithm Challenges and event?
I'm interested in knowing whether it is advisable for computer science students to spend their major chunk of time on the online judges practising programming(like Topcoder and codeforces) or it's ...
6
votes
6answers
458 views
If your algorithm is correct, does it matter how long it took you to write it?
I recently found out that Facebook had a programming challenge that if completed correctly you automatically get a phone interview.
There is a sample challenge that asks you to write an algorithm ...
2
votes
1answer
135 views
How good is The Algorithm Design Manual 2nd edition compared to the 1st edition for a beginner?
I'm looking for a good book on algorithms and data structures for a beginner. I was reading some reviews of these two books: Introduction to Algoritms and The Algorithm Design Manual.
Introduction to ...
26
votes
10answers
2k views
Why is it impossible to produce truly random numbers?
I was trying to solve a hobby problem that required generating a million random numbers. But I quickly realized, it is becoming difficult to make them unique. I picked up Algorithm Design Manual to ...
3
votes
2answers
170 views
Algorithm for the shrinking of pixel art
This is something I've been wondering about for a while - are there any algorithms out there to scale pixel art down?
I'm sure we all know about the upscale versions on the Wikipedia page on Image ...
5
votes
2answers
87 views
Min cost concatenation alignment
I am doing a project on data mining.
I have a very large string of size, say n and many small strings, l_1,l_2.. each of size at most m. I want to find the sequence of small strings such that their ...
4
votes
2answers
198 views
How to parallelize a sequential algorithm?
What thought process should one follow to convert a sequential algorithm to a parallel one ?
Are there any specific code pattern that can be parallelized.
Some patterns that I normally use are:
...