I hereby claim:
- I am carlincanales on github.
- I am carlincanales (https://keybase.io/carlincanales) on keybase.
- I have a public key ASDO8icpU8y-aN7-C1n4P_p1wCvVVeceedvAhBt8vKyxygo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/* | |
Your previous Plain Text content is preserved below: | |
Given two arrays: | |
Array 1 - A distinct set of ice cream flavors | |
Array 2 - A set of ice cream flavors (may contain duplicates) | |
Please write a function that returns the values of Array 2 sorted by the order of Array 1. |
function stockPairs(stocksProfit, target) { | |
// Write your code here | |
const pairs = []; | |
stocksProfit.forEach((profit1, idx1) => { | |
stocksProfit.forEach((profit2, idx2) => { | |
if (idx1 === idx2) return; | |
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
$gutter: 30px; | |
$columns: 12; | |
$max-width: 1000px; | |
* { |
function getPath(object, value) { | |
var pathToUse = "", | |
path = [], | |
level = 0; | |
function traverse(o, prop) { |
function isPalindrome(str){ | |
var iteration, i = 0; | |
// if str is only one character long, no matter the character, return false | |
if(str.length < 2) return false; | |
// set all characters to lowercase and strip any invalid characters | |
str = str.toLowerCase().replace(/[\W\d_]/g, ""); | |
function aardvark(str){ | |
var len = str.length, tempStr, iteration; | |
// if str is 2 characters or less return null right away | |
if(len < 3) return null; | |
// temporarily convert str to all lowercase to properly compare each character | |
tempStr = str.toLowerCase(); |