mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2025-12-11 00:21:24 +01:00
feat(solutions): add frequency-deviation/javascript/function
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import readline from 'node:readline'
|
||||
|
||||
import { getMaximumFrequencyDeviation } from './getMaximumFrequencyDeviation.js'
|
||||
|
||||
const input = []
|
||||
const readlineInterface = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
})
|
||||
readlineInterface.on('line', (value) => {
|
||||
input.push(value)
|
||||
})
|
||||
|
||||
const solution = () => {
|
||||
console.log(getMaximumFrequencyDeviation(input[0]))
|
||||
}
|
||||
|
||||
readlineInterface.on('close', solution)
|
||||
Reference in New Issue
Block a user