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.

learn more… | top users | synonyms (2)

1
vote
0answers
10 views

Setting up an asymmetric frustum

I have a program in which I am tracking user's position and setting the frustum (setting the camera at user's position) to change the perspective of the scene as per the user's position. Until right ...
1
vote
0answers
58 views

ith order Selection in O(n) time

From "Introduction to algorithms" I am trying to implement the code as dividing n elements in n/5 groups, then recursively finding the median and then recursively finding the ith order statistics. ...
0
votes
1answer
17 views

Algorithm for certain permutaion of array elements (parallel sorting by regular sampling) [C++]

I am implementing an parallel sorting by regular sampling algorithm which is described here. I am stuck in a point at which I need to migrate sorted sublists to proper places of the sorted array. The ...
0
votes
0answers
14 views

Creating different matrices for separate asymmetric frustums

I have a program in which I am creating an asymmetric frustums for different shapes. I made it into a class and use it in my program with something as follows: AssymetricFrusutm asyFrustum; ...
0
votes
2answers
35 views

Why would it be impossible to mannually test AES algorithm?

I have this teacher who asked to study AES encryption algorithm, a C code implementation and do a bench testing of it. So, I've not even tried to do a calculation of the number of steps it would ...
1
vote
3answers
30 views

How to order articles by both quality score and publish date?

I have a database that contains articles with pre-calculated quality scores ranging from 0 to 10 (with 10 being best quality) and each article has a published date. Here is an example database ...
1
vote
3answers
120 views

Why aren't functions like std::is_permutation() intrinsically unsafe?

C and C++ programmers have taken a beating over the last decade or so for often failing to perform proper bounds checking, especially on strings. These failures have often resulted in deep security ...
5
votes
3answers
66 views

Counting Inversions (Issue with Large Input)

I am currently working on counting inversions exercise using mergesort. The problem I am facing is when I have small or medium sized array the result is perfectly fine however if I use a very large ...
1
vote
0answers
72 views

How to fix this floating point square root algorithm

I am trying to compute the IEEE-754 32-bit Floating Point Square Root of various inputs but for one particular input the below algorithm based upon the Newton-Raphson method won't converge, I am ...
0
votes
2answers
40 views

Using Heron's formula to calculate area - JavaScript

My code: function calculate(sides) { var sides = prompt("Triangle side lengths in cm (number,number,number)"); //String will be size of 4 var nsides = sides.split(" "); //Splits content into ...
-1
votes
1answer
58 views

Group a list and sort that list by occurrence in java [on hold]

I have a large list of names (first name and lastname): For example: { john a, david x, marry u, john b, david y, john c} The result should be (grouped by first name, ordered by frequency of the ...
0
votes
1answer
31 views

infinite number of maximally unbalanced red black trees

I have to find a family of maximally unbalanced red-black trees and to prove the "respective attributes" of that family to prove that there is an infinitely big family of red black trees that have a ...
1
vote
0answers
57 views

Fast treewidth algorithms

I would like to compute the treewidth of a graph. There are really good heuristics for other hard graph problems such as graph isomorphism VF2 algorithm steps with example with code available in ...
2
votes
3answers
66 views

One array or many? (hash table)

I've an array that is being used to store the conversion factors for a conversion program I'm currently working on. A short Example: var Length = { "lengthsA" : { "inch" : 0.0254, "yard" : ...
1
vote
0answers
54 views

Merging two different lists of datetime intervals

I'm trying to merge two lists. Each list has a start date, end date and a value. Resulting list must have both values. Intervals from list 2 will need to be split when intervals don't match. I'm able ...

1 2 3 4 5 2089
15 30 50 per page