2022 Developer Survey is open! Take survey.
6 votes

Deepest pit of an array

Overall, reading this code, my reaction is "huh?". It looks like a bunch of gibberish at first (and second) glance. There are no english words. I would not want to maintain this code after ...
user avatar
2 votes
Accepted

FizzBuzz in JavaScript (node.js), my first JavaScript program

A short review; special is not an evocative name, maybe divisors? special is polluting the ...
user avatar
  • 32.4k
2 votes

FizzBuzz in JavaScript (node.js), my first JavaScript program

Wikipedia: Fizz buzz Programming Fizz buzz (often spelled FizzBuzz in this context) has been used as an interview screening device for computer programmers. Writing a program to output the first 100 ...
user avatar
  • 3,273
2 votes

Deepest pit of an array

function deepest_pit(B) { The JavaScript style guide here indicates that camelCase is recommended for functions. JavaScript is ...
user avatar
1 vote

Calculate the first largest factor of 600851475143

Couple of points: Use integer division, the double slash //. This has an update partner //= too so ...
user avatar
  • 246
1 vote
Accepted

JavaScript function that generates Fibonacci like sequences of given order

Your algorithm for an n element Fibbonacci series order k is O(N*K) Your JavaScript implementation may be inefficient. I revised your algorithm to become O(N). I revised your JavaScript implementation ...
user avatar
  • 3,273
1 vote

Infix calculator programming challenge Kattis.com

My first suggestion is to stop doing 2 passes through the file. Just call get_command_type() on every non-empty command from ...
user avatar
  • 644
1 vote

Find the 'n' most frequent words in a text, aka word frequency

Comments are inline in /// ...
user avatar
  • 121

Only top scored, non community-wiki answers of a minimum length are eligible