Skip to content

Instantly share code, notes, and snippets.

Avatar
🏙️
Moved to a nice city

Eduardo eduarmreyes

🏙️
Moved to a nice city
View GitHub Profile
@eduarmreyes
eduarmreyes / interview-questions.md
Created Aug 12, 2019 — forked from jvns/interview-questions.md
A list of questions you could ask while interviewing
View interview-questions.md

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

View find.js
function find(needle, heystack) {
let returnValue = false;
let indexNeedle = 0;
heystack.split("").forEach(element => {
if (needle[indexNeedle] === element) {
indexNeedle += 1;
if (indexNeedle === needle.length) {
return false; // break free the cycle
}
}
View intersection-of-arrays.js
function intersection(array1, array2) {
const intersectionOfArrays = [];
const cache = {};
array1.forEach(element => {
cache[element] = element; /// filling up my dictionary
});
array2.forEach(element => {
if (cache[element]) {
intersectionOfArrays.push(element);
}
@eduarmreyes
eduarmreyes / poketrack-settings.txt
Created Feb 18, 2018
PokéTrack favorite Pokés
View poketrack-settings.txt
document.getElementById('cfs_393').checked = true
document.getElementById('cfs_398').checked = true
document.getElementById('cfs_403').checked = true
document.getElementById('cfs_404').checked = true
document.getElementById('cfs_405').checked = true
document.getElementById('cfs_406').checked = true
document.getElementById('cfs_407').checked = true
document.getElementById('cfs_412').checked = true
document.getElementById('cfs_413').checked = true
document.getElementById('cfs_417').checked = true
@eduarmreyes
eduarmreyes / solution.js
Created Jun 29, 2017
Equid: Find an index in an array such that its prefix sum equals its suffix sum.
View solution.js
```
This is a demo task.
A zero-indexed array A consisting of N integers is given. An equilibrium index of this array is any integer P such that 0 P < N and the sum of elements of lower indices is equal to the sum of elements of higher indices, i.e.
A[0] + A[1] + ... + A[P−1] = A[P+1] + ... + A[N−2] + A[N−1].
Sum of zero elements is assumed to be equal to 0. This can happen if P = 0 or if P = N−1.
For example, consider the following array A consisting of N = 8 elements:
A[0] = -1
@eduarmreyes
eduarmreyes / a_f.js
Created Jun 23, 2017
Array Flatten using Javascript
View a_f.js
(function() {
function f_a(a, result = []) {
a.map(function(e) {
if (Array.isArray(e)) {
result.concat(f_a(e, result));
} else {
result.push(e);
}
});
return result;
You can’t perform that action at this time.