This file contains hidden or 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 { createGlobPatternsForDependencies } = require('@nrwl/react/tailwind'); | |
const colors = require('tailwindcss/colors'); | |
const defaultTheme = require('tailwindcss/defaultTheme'); | |
/** @type {import('tailwindcss').Config} */ | |
module.exports = { | |
content: ['./app/**/*.{ts,tsx,jsx,js}', ...createGlobPatternsForDependencies(__dirname)], | |
theme: { | |
extend: { | |
fontFamily: { |
This file contains hidden or 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 sampleData = [0, 1, 100, 99, 0, 10, 90, 30, 55, 50, 33, 49, 49, 55, 75, 51, 49, 50, 51, 50, 49, 51]; | |
const findUniquePairsThatSumToA = (summedValue, data) => { | |
const usedValues = new Map([]); | |
return data.reduce((acc, dataValue) => { | |
const matchingPairUsedCount = usedValues.get(summedValue - dataValue) || 0; | |
const matchingPairUsed = usedValues.has(summedValue - dataValue); | |
if (matchingPairUsed && matchingPairUsedCount === 1) acc.push([dataValue, summedValue - dataValue]); | |
usedValues.set(summedValue - dataValue, matchingPairUsedCount + 1); |