Skip to content

Instantly share code, notes, and snippets.

View cfinn16's full-sized avatar

Connor Finnegan cfinn16

View GitHub Profile
@cfinn16
cfinn16 / UpdatedThirdSolution.js
Created April 12, 2019 17:53
Updated Solution to Third Problem
const bingeWatching = (timeElapsed, duration, action, amount) => {
const timeStrToSeconds = (str) => {
newArr = str.split(':').map(Number)
return (newArr[0] * 3600) + (newArr[1] * 60) + newArr[2]
}
const secondsToTimeStr = (seconds) => {
let hours = Math.floor(seconds / 3600)
if (hours === 0) {
hours = "00"
@cfinn16
cfinn16 / Solutions.js
Created April 12, 2019 16:39
Bluecore Coding Assignment
//First Problem Solution
const consecutiveOddOrEvenDigits = (num) => {
let newArr = []
const digits = num.toString().split('')
const numArr = digits.map(Number)
console.log(numArr)
while (numArr.length > 0) {
let j = 1
while (numArr[0] % 2 === numArr[j] % 2) {