A Pen by Arthur Fanti on CodePen.
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 minWindowSubstring(s, t) { | |
// Initialize frequency maps for characters in strings s and t | |
const charFreqT = new Map(); | |
const charFreqS = new Map(); | |
// Fill charFreqT with characters and their frequencies from t | |
for (const char of t) { | |
charFreqT.set(char, (charFreqT.get(char) || 0) + 1); | |
} |
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, { useCallback, useState } from 'react'; | |
import { createRoot } from 'react-dom/client'; | |
const containerStyle = { | |
'display': 'flex', | |
'alignItems': 'center', | |
'flexDirection': 'column' | |
} | |
const instructionsStyle = { |
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
var SITE = SITE || {}; | |
SITE.fileInputs = function() { | |
var $this = $(this), | |
$val = $this.val(), | |
valArray = $val.split('\\'), | |
newVal = valArray[valArray.length-1], | |
$button = $this.siblings('.button'), | |
$fakeFile = $this.siblings('.file-holder'); | |
if(newVal !== '') { |