bruch-alex / sorting-algorithm-visualization

This program offers real-time visualizations of various sorting algorithms
1 stars 1 forks source link

(Optional) Statistic for each algorithm #13

Closed nat-laz closed 1 month ago

nat-laz commented 1 month ago
HeapSort-metrics

@bruch-alex wdyt? what can be added? 🤔

bruch-alex commented 1 month ago

I think nothing else, looks really nice, maybe just print statistic for each algorithm in a line since we have not much vertical space...

nat-laz commented 1 month ago

let's try it tomorrow centered, using this method:

public static void printInCenter(String line, String symbolForFill) {
        int width = UI.terminal.getWidth();
        int padding = ((width - line.length()) / 2);
        JTerminal.println(symbolForFill.repeat(Math.max(0, padding)) + line + symbolForFill.repeat(Math.max(0, padding)));
    }

then we will decide