10
votes
Accepted
What does " i , j <-- 1"mean in pseudocode?
Assuming this is the algorithm for a Fibonacci number generator, it represents simultaneous/parallel assignment; the comma is not separating two statements, but two operands to the <- operator.
In ...
8
votes
Meaning of infinity sign in pseudocode?
That line (3) is simply saying initialize the Minimum value to the highest feasible value. In pseudocode that is infinity. If min was UInt32 in real code, then min would be UInt32.Max.
In other ...
4
votes
Accepted
Parallel execution: 1 thread pool or N thread pools?
There are two basic reasons to run a thread pool.
Creating threads as you go is expensive. With a pool, you create them only once, and re-use them as needed, saving the overhead.
The optimum number of ...
3
votes
Scrabble Grid Word Detection Algorithm
To detect a 'word' start with the square in which a tile has been placed and check adjacent squares for tiles.
If a tile is found follow the squares in the same direction untill you reach an empty ...
3
votes
Algorithm to identify differences between two sorted data sets
I would simplify
WHILE LEFT_DATA_NOT_EOF AND RIGHT_DATA_NOT_EOF
IF LEFT_KEY IS LESS THAN RIGHT_KEY
PRINT LEFT_KEY
LEFT_DATA_NOT_EOF = CALL READ_LEFT_RECORD()
ELSE IF ...
3
votes
What does " i , j <-- 1"mean in pseudocode?
It most likely is a tuple assignment, i.e. assigning multiple values on the right to multiple variables on the left, with a shortcut to have only one value on the right which will be assigned to all ...
3
votes
Algorithm for scheduling shifts
The supposed algorithm will not work, because it contains no collision handling. But there is a simple way to extend it to make it at least produce some solution:
in step 1, if there are collisions ...
3
votes
Inefficient Pseudocode
Improving the pseudocode structure
In line 7 it appears that you restart every time you find a new element to add to D. However, in pseudocode and mathematical language, you have no guarantee about ...
2
votes
Many if conditions
You have many conditions, and you have results that are created by combining data for true conditions.
Creat a class that can combine these values. Then your code might look like
StringResult calcs;...
2
votes
Scrabble Grid Word Detection Algorithm
If you separate the problem into smaller pieces, you will see that this is not as hard. Note that since you did not post any code, I can't give you the direct answer, but I'll help you get started on ...
2
votes
Algorithm for scheduling shifts
It sounds like you are trying to solve the "Nurse Scheduling Problem" (NSP), although your problem seems to be a simplified version of it. There are many articles written about how to find feasible ...
1
vote
Should I write integration test that test my code with real-network servers, before I start writing my code?
You need a development or test environment which has these things setup the same as you live environment.
Sure it takes time and maybe for your particular case cutting corners is fine. But generally ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
pseudocode × 39algorithms × 15
design × 4
python × 4
java × 2
c# × 2
programming-practices × 2
terminology × 2
functional-programming × 2
message-queue × 2
sorting × 2
efficiency × 2
recursion × 2
parallelism × 2
unit-testing × 1
data-structures × 1
refactoring × 1
development-process × 1
multithreading × 1
tdd × 1
coding-standards × 1
language-agnostic × 1
optimization × 1
concurrency × 1
code-reviews × 1