Skip to content

Instantly share code, notes, and snippets.

View Bullsized's full-sized avatar

Ivan Stefanov Bullsized

View GitHub Profile
@philipstanislaus
philipstanislaus / gist:c7de1f43b52531001412
Last active February 12, 2025 13:46
JavaScript: Save a blob to disc
var saveBlob = (function () {
var a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
return function (blob, fileName) {
var url = window.URL.createObjectURL(blob);
a.href = url;
a.download = fileName;
a.click();
window.URL.revokeObjectURL(url);
@mmloveaa
mmloveaa / Missing Word
Last active November 1, 2023 09:52
Missing Word
Julia and Samantha are playing with strings. Julia has a string S, and Samantha has a string T which is a subsequence of string S. They are trying to find out what words are missing in T.
Help Julia and Samantha to solve the problem. List all the missing words in T, such that inserting them at the appropriate positions in T, in the same order, results in the string S.
Constraints
1 <= |T| <= |S| <= 106, where |X| denotes the length of string X.
The length of each word will be less than 15.
Function Parameter
You are given a function missingWords that takes the strings S and T as its arguments.