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.

learn more… | top users | synonyms (1)

0
votes
1answer
31 views

Java Alphabetize Algorithm Insertion sort vs Bubble Sort

I am supposed to "Develop a program that alphabetizes three strings. The program should allow the user to enter the three strings, and then display the strings in alphabetical order." It's instructed ...
-2
votes
0answers
19 views

Attempt at Merge Sort: Is this correct? [migrated]

I am trying to write a merge sort algo. I can't tell if this is actually a canonical merge sort. If I knew how to calculate the runtime I would give that a go. Does anyone have any pointers? Thanks. ...
8
votes
3answers
224 views

Is there a 'design pattern' type listing of common algorithms?

Is there a 'design pattern' styled listing of common/popular algorithms anywhere? Specifically, something that has a similar format along the lines of: Algorithm Name: e.g., Quick Sort, Bubble Sort, ...
-2
votes
1answer
125 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 ...
3
votes
2answers
135 views

Taking a Projects Development to the Next Level

I have been looking for some advice for a while on how to handle a project I am working on, but to no avail. I am pretty much on my fourth iteration of improving an "application" I am working on; the ...
0
votes
2answers
82 views

Detect duplicate in a subset from a set of elements

I have a set of numbers say : 1 1 2 8 5 6 6 7 8 8 4 2... I want to detect the duplicate element in subsets(of given size say k) of the above numbers... For example : Consider the increasing ...
1
vote
3answers
81 views

Distance from point to n-dimensional line [closed]

The solution for the 3-d case can be found here; I would like to get the generalized version. There's no simple generalization of the Mathworld algorithm since the cross product is defined only for 3 ...
0
votes
0answers
135 views

Microsoft Interview Preparation [closed]

I have 8 years of java background. Need help in identifying topics I need to prepare for Microsoft interview. I need to know how many rounds Microsoft will have and what all things these rounds ...
5
votes
1answer
178 views

What are algorithmic paradigms?

We generally talk about paradigms of programming as functional, procedural, object oriented, imperative etc but what should I reply when I am asked the paradigms of algorithms? For example are ...
7
votes
4answers
196 views

How/where to run the algorithm on large dataset?

I would like to run the PageRank algorithm on graph with 4 000 000 nodes and around 45 000 000 edges. Currently I use neo4j graph databse and classic relational database (postgres) and for software ...
8
votes
3answers
363 views

How to calculate Sin function quicker and more precisely?

I want to calculate y(n)=32677Sin(45/1024•n), where y is an integer and n ranges from 0 to 2048. How can I make this process quicker and more precisely? Now I want to show you a reference answer: ...
13
votes
4answers
300 views

What algorithms can I use to detect if articles or posts are duplicates?

I'm trying to detect if an article or forum post is a duplicate entry within the database. I've given this some thought, coming to the conclusion that someone who duplicate content will do so using ...
36
votes
7answers
2k views

How important is it for a programmer to know how to implement a QuickSort/MergeSort algorithm from memory?

I was reviewing my notes and stumbled across the implementation of different sorting algorithms. As I attempted to make sense of the implementation of QuickSort and MergeSort, it occurred to me that ...
2
votes
1answer
65 views

Tiling Problem Solutions for Various Size “Dominoes”

I've got an interesting tiling problem, I have a large square image (size 128k so 131072 squares) with dimensons 256x512... I want to fill this image with certain grain types (a 1x1 tile, a 1x2 ...
3
votes
1answer
134 views

Efficient Data Structure for this particular problem

Problem Link - http://opc.iarcs.org.in/index.php/problems/NUMTRIPLE In my opinion, the problem can be solved by a data structure, that shows how each number is connected to another, and via recursion ...

1 2 3 4 5 32
15 30 50 per page