Questions tagged [pseudocode]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

Many if conditions

I have the code but I want to be pseudo as possible so I learn from other ways as much as possible. So what I am building is web based tool and in one section we have a table. This table renders lines ...
Codemenot's user avatar
-1 votes
1 answer

Design suggestions for my simple data-analysis program

I need to create a program with the purpose of cross-referencing personal info from a spreadsheet(s), to check for conflicts of interest between clients of 3 different law firms. All of this client ...
boog's user avatar
  • 99
1 vote
1 answer

Inefficient Pseudocode

I have problems to write my first simple pseudocode. The input of the algorithm is an ontology which contains axioms and an inference set, exactly an inference is defined as an object with set of ...
marouane nadir's user avatar
2 votes
1 answer

Parallel execution: 1 thread pool or N thread pools?

I have a tree generated by configuration. Each leaf of the tree is a long running task (like DB query, reading from file, etc.) that gives a result I want to store in a mirrored tree with only the ...
Fabio Filippi's user avatar
0 votes
2 answers

Scrabble Grid Word Detection Algorithm

I am building a scrabble game, and I have already a dictionary working. When the user will place letters on grid, I need to check that all the words are valid. Which algorithm can I use or how can I ...
Rehan ul Hassan's user avatar
1 vote
2 answers

What does " i , j <-- 1"mean in pseudocode?

I'm trying to understand what this pseudocode does and I can't seem to understand what the comma is suppose to do here. I know that j <- 1 is j = 1 but what about the i? And what does j <- j do ...
vortix's user avatar
  • 43
2 votes
1 answer

Meaning of infinity sign in pseudocode? [closed]

I searched extensively and can't figure out what the infinity sign is meant in this pseudocode. The code is taken from here, which has a detailed explanation of dynamic programming for the coin ...
Circadian's user avatar
-1 votes
2 answers

Algorithm for scheduling shifts

I am trying to write a program to help scheduling shifts for the employees of a small business. There are 28 shifts that needs to be assigned to 28 employees (so this means that each person gets a ...
CL OS's user avatar
  • 11
0 votes
2 answers

Should I write integration test that test my code with real-network servers, before I start writing my code?

I am trying to write integration tests for a client-server app. The client app runs on a user's machine and connects to the server app running on a specific Windows server, network-serverA. The ...
alpha_989's user avatar
  • 139
0 votes
1 answer

Algorithm to identify differences between two sorted data sets

PROBLEM STATEMENT: Print the items that differ between the following two left and right sorted data sets: A A B C C D D E G F H EOF EOF The proposed solution ...
Constantin's user avatar
1 vote
0 answers

concurrency via message queues: how to avoid recursion?

I am working on a concurrency system based on message queues with an underlying thread pool. A queue can target other queues. Also a queue can be targeted by multiple queues (i.e. children) to create ...
user965972's user avatar
23 votes
6 answers

Beginner: Why aren't operations contained within output commands?

I'm going through an introductory programming book and it lists a simple example in pseudocode: Start input myNumber set myAnswer = myNumber * 2 output myAnswer Stop Why can't we omit ...
user1475207's user avatar
-1 votes
1 answer

Aligning text columns of different size and content

In a past posting, I asked about commands in Bash to align text columns against one another by row. It has become clear to me that the desired task (i.e., aligning text columns of different size and ...
Michael Gruenstaeudl's user avatar
21 votes
4 answers

"Remembering" values in functional programming

I've decided to take upon myself the task of learning functional programming. So far it's been a blast, and I've 'seen the light' as it were. Unfortunately, I don't actually know any functional ...
Ucenna's user avatar
  • 1,292
-2 votes
1 answer

What does this line mean in subset sum problem's pseudocode?

I'm trying to understand the approximate polynomial time algorithm for subset sum problem at Wikipedia, but I stuck at the pseudocode's 3rd line: let T be a list consisting of xi + y, for all y in ...
miklosme's user avatar
  • 101
0 votes
1 answer

Formalising algorithms - Greek symbol uses/sources [closed]

I am looking to formalise an algorithm that I have created, however, I am having trouble knowing how to correctly use Greek symbols (such as Epsilon, Omega etc.). Are there any guides/standardised way ...
Colin747's user avatar
  • 127
8 votes
4 answers

Why do textbooks use pseudocode rather than real languages?

In colleges and in algorithm textbooks, it is quite common for the teacher and author to explain control flow in pseudo-code. With the advent of more expressive languages like Python and Haskell among ...
Asterisk's user avatar
  • 353
9 votes
4 answers

What is the most efficient way to store this data?

I am in charge of rewriting some old VB code. I understand how it works, but I feel like there is a far-more efficient way to do what they did. I just can't figure out what it is. Here is a contrived ...
DJMcMayhem's user avatar
8 votes
2 answers

What does pi mean in this BFS algorithm pseudocode?

I have the following pseudocode for breadth-first search algorithm BFS(G,s) 1 for each vertex u ∈ V(G) \ {s} 2 color[u] = white 3 d[u] = ∞ 4 π[u] = nil 5 color[s] = gray 6 d[s] = 0 ...
user avatar
5 votes
1 answer

Finding common subsets in a list of sets

Let say I have a list of sets, defined like this (3 sets in this example) : A = [1, 2, 3, 4, 5] B = [4, 5, 6, 7, 8] C = [1, 2, 3, 4, 5, 6, 7, 8] Total number of elements defined in sets : 18 I'd ...
tigrou's user avatar
  • 269
2 votes
5 answers

Is it acceptable to ask management for pseudo code? [closed]

I'm a developer in the IT department of a large oil company. I received a spec document, basically in plain English, about business rules that need to be implemented in a new application. The rules ...
FastTrack's user avatar
  • 137
0 votes
1 answer

Estimating time remaining in a queue with multiple workers

I've been trying to figure out a way of calculating the estimated time remaining for an item in a queue when there are multiple workers processing items from the single queue. A client submits a job ...
Blank's user avatar
  • 253
0 votes
2 answers

What graph traversal algorithm should I use?

I would like to write an algorithm which can traverse a graph and hopefully later I can implement it to use for an indoor navigation system. The graph would come from floor plans of a building and ...
NKK's user avatar
  • 21
1 vote
2 answers

Getting the relational table data into XML recursively

I have levels of tables (Level1, Level2, Level3, ...) For simplicity, we'll say I have 3 levels. The rows in the higher level tables are parents of lower level table rows. The relationship does not ...
Tom's user avatar
  • 113
1 vote
2 answers

What does "if w in [1..5, 8, 11]" mean in pseudo code?

In some pseudocode, I saw the following: if w in [1..5,8,11] Does it mean that if w is from 1 to 5 or 8 or 11? Or is it something else?
Saras's user avatar
  • 149
5 votes
1 answer

Loop invariant vs Assertions

I have an exam on Programming Concepts this Saturday and I am struggling to find some information to understand some concepts better. What is the difference between loop invariant and assertion? To ...
user avatar
11 votes
3 answers

Is there such a concept as "pseudo implementation" in software development?

I'm looking for a label to describe the practice of using human-based computation methods or other means of "faking" an algorithm for the sake of getting a product or demo off the ground quickly ...
Edan's user avatar
  • 221
1 vote
4 answers

algorithm to print the digits in the correct order

I've been trying to write an algorithm that will print separately the digits from an integer. I have to write it in Pseudocode. I know how to write an algorithm that reverse the digits. digi(n): ...
Aga Waw's user avatar
  • 19
3 votes
2 answers

Why is design by contract considered an alternative to the pseudo programming process?

Right now I'm reading Code Complete by Steve McConnell and in chapter 9 he talks about the Pseudo Programming Process (PPP). From what I've understood, the PPP is a way of programming in which the ...
Mihai Bişog's user avatar
10 votes
9 answers

When would I use pseudocode instead of flowchart?

I'm a student working with various techniques of programming, and I've come across pseudocode and flowchart. I know that these are both used in order to think through the problem before actually ...
kullalok's user avatar
  • 1,085
19 votes
8 answers

What is pseudocode?

I've seen a lot of mentions of Pseudocode lately, on this site and others. But I don't get it: What is Pseudocode? For example, the Wikipedia article below says "It uses the structural conventions of ...
Dynamic's user avatar
  • 5,756
-1 votes
1 answer

Pseudocode for an echo using recursion [closed]

Using pseudocode, what would the code for an echo using recursion be? UPDATE: Appears I should have been more clear. By echo I mean the pattern sound exhibits when it echos, not echo as in repeatly ...
blunders's user avatar
  • 4,540
5 votes
2 answers

Is there a standard pseudocode for parallel algorithms?

The common styles of pseudocode are largely intelligible, and it is more or less clear how to write pseudocode for sequential programs. But if parallelism is not hidden behind a full library and is ...
shuhalo's user avatar
  • 211
5 votes
7 answers

Can initial inefficient solutions INSPIRE better ones and thus lead to faster problem solving?

When faced with writing an algorithm to solve a small project/problem is it better to come up with pseudo code that isn't efficient/optimum but solves the problem and then try to use the inefficient ...
rrazd's user avatar
  • 1,398
1 vote
2 answers

Clarification of pseudo random number generator

I am asked to create a pseudo-random number generator using the following algorithm: The generator will generate every integer from 1 to N-1 exactly once The algorithm for N=2^n Initialize an ...
user avatar
8 votes
5 answers

what's best platform for explaining pseudo-code to a developer who knows nothing about it? [closed]

I'm a scientific person needing to document complex Matlab code to hand to a developer for him/her to understand and program in a different language. In the past, I've used MS Word (explaining each ...
gkdsp's user avatar
  • 497
7 votes
2 answers

Fast algorithm for finding common elements of two sorted lists

Suppose I have two lists of N 3 by 3 vectors of integers. I need to find a quick way (say of running time at most N^(1+epsilon)) to find the vectors of the first list that have the same 1st ...
manenir's user avatar
  • 179
20 votes
13 answers

Difference between a pseudo code and algorithm?

Technically, Is there a difference between these two words or can we use them interchangeably? Both of them more or less describe the logical sequence of steps that follow in solving a problem. ain't ...
Vamsi Emani's user avatar
  • 1,755
21 votes
16 answers

Should one use pseudocode before actual coding?

Pseudocode helps us understand tasks in a language-agnostic manner. Is it best practice or suggested approach to have pseudocode creation as part of the development lifecycle? For instance: Identify ...