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 fs = require("fs"); | |
const nodeExternals = require("webpack-node-externals"); | |
module.exports = { | |
modify: (config, { target, dev }, webpack) => { | |
const babelRuleIndex = config.module.rules.findIndex( | |
rule => | |
rule.use && | |
rule.use[0].loader && | |
rule.use[0].loader.includes("babel-loader") |
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
Cracking the Coding Interview, 5th Edition | |
Question 1.1 | |
Implement an algorithm to determine if a string has all unique characters. What if you cannot use additional data structures? | |
My Solution: | |
Brute force solution | |
============================================================================================ | |
Idea: For each character, check whether there is a same character for the rest of the string |
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
/* | |
ID: davidkw2 | |
LANG: C++ | |
TASK: numtri | |
*/ | |
#include <cstdio> | |
#include <cstdlib> | |
#include <iostream> | |
#include <fstream> |
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
/* | |
ID: davidkw2 | |
LANG: C++ | |
TASK: combo | |
*/ | |
#include <cstdio> | |
#include <cstdlib> | |
#include <iostream> | |
#include <fstream> |
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
/* | |
ID: davidkw2 | |
LANG: C++ | |
TASK: barn1 | |
*/ | |
#include <cstdio> | |
#include <cstdlib> | |
#include <iostream> | |
#include <fstream> |
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
/* | |
ID: davidkw2 | |
LANG: C++ | |
TASK: dualpal | |
*/ | |
#include <cstdio> | |
#include <cstdlib> | |
#include <iostream> | |
#include <fstream> |
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
/* | |
ID: davidkw2 | |
LANG: C++ | |
TASK: palsquare | |
*/ | |
#include <cstdio> | |
#include <cstdlib> | |
#include <iostream> | |
#include <fstream> |
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
/* | |
ID: davidkw2 | |
LANG: C++ | |
TASK: milk2 | |
*/ | |
#include <cstdio> | |
#include <cstdlib> | |
#include <iostream> | |
#include <fstream> |
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
/* | |
ID: davidkw2 | |
LANG: C++ | |
TASK: friday | |
*/ | |
#include <cstdio> | |
#include <cstdlib> | |
#include <iostream> | |
#include <fstream> |
NewerOlder