Top "Pseudocode" questions

Pseudocode is a compact and informal high-level description of a computer programming algorithm.

Algorithm to calculate the number of divisors of a given number

What would be the most optimal algorithm (performance-wise) to calculate the number of divisors of a given number? It'll be …

performance algorithm pseudocode
Quicksort: Choosing the pivot

When implementing Quicksort, one of the things you have to do is to choose a pivot. But when I look …

algorithm sorting pseudocode quicksort
Find the paths between two given nodes?

Say I have nodes connected in the below fashion, how do I arrive at the number of paths that exist …

algorithm path graph-theory pseudocode
Java balanced expressions check {[()]}

I am trying to create a program that takes a string as an argument into its constructor. I need a …

java stack pseudocode
From milliseconds to hour, minutes, seconds and milliseconds

I need to go from milliseconds to a tuple of (hour, minutes, seconds, milliseconds) representing the same amount of time. …

algorithm date pseudocode
uml classdiagram constructor with parameters

I am a complete ROOKIE at this so I need some help on it. How would you create uml class …

class structure diagram pseudocode
Two Rectangles intersection

I have two rectangles characterized by 4 values each : Left position X, top position Y, width W and height H: X1, …

algorithm math pseudocode shapes
How to initialise a 2D array in Python?

I've been given the pseudo-code: for i= 1 to 3 for j = 1 to 3 board [i] [j] = 0 next j next i How would …

python arrays multidimensional-array pseudocode
Maximum Likelihood Estimate pseudocode

I need to code a Maximum Likelihood Estimator to estimate the mean and variance of some toy data. I have …

python statistics machine-learning pseudocode
Static (Lexical) Scoping vs Dynamic Scoping (Pseudocode)

Program A() { x, y, z: integer; procedure B() { y: integer; y=0; x=z+1; z=y+2; } procedure C() { z: integer; procedure …

scope output pseudocode