This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const fs = require('fs'); | |
process.stdin.resume(); | |
process.stdin.setEncoding('utf-8'); | |
let inputString = ''; | |
let currentLine = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function simpleArraySum(ar) { | |
let sum = 0; | |
for (let i=0; i < (ar.length); i++) { | |
sum = sum + ar[i]; | |
} | |
return sum; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MathChallenge(num) { | |
// code goes here | |
var numstr; | |
var numdigits = []; | |
var operatorsNeeded; | |
var combinations; | |
var combinationsList = []; | |
var evalString = ""; | |
var operatorString = ""; | |
var bestMatchStr = "not possible"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
import ReactDOM from 'react-dom'; | |
// | |
// To reviewer: Note I have not worked with react before. I have submitted what I | |
// have completed to move forward with the exercise. It looks like I'm stuck on | |
// passing the data between the siblings. Thanks for reviewing. | |
// | |
const style = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ArrayChallenge(strArr) { | |
// code goes here | |
let appointmentArray = []; | |
let isStartPM = Boolean; | |
let isEndPM = Boolean; | |
let appointmentArrayMinutes = []; | |
let largestGapMinutes = 0; // Initialize to 0 so overlapping appointments will 0 minutes gap. | |
let start; | |
let end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This program will count the number of href's for a list of websites | |
// specified on the command line. | |
// | |
// Example: | |
// node parseHTML.js https://wikipedia.com https://perry-brandiezs.com | |
// https://wikipedia.com 318 | |
// https://perry-brandiezs.com 6 | |
const request = require('request'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.URL | |
import org.apache.commons.lang3.StringUtils | |
fun main(args: Array<String>) { | |
args.forEach { | |
// val contents = URL("https://www.wikipedia.com").readText() | |
val contents = URL(it).readText() | |
val hrefCount = StringUtils.countMatches(contents, "href") | |
println("$it $hrefCount") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wrapper { | |
height: 100vh; | |
/*This part is important for centering*/ | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} | |
.typing-demo { | |
width: 22ch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const palindrome = str => { | |
str = str.toLowerCase() | |
return(str === str.split('').reverse().join('')) | |
} | |
palindrome("Kayak"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fibonacci = num => { | |
if(num < 2) { | |
return num | |
} | |
return fibonacci(num - 1) + fibonacci(num -2) | |
} | |
console.log(fibonacci(5)) |
NewerOlder