Skip to content

Instantly share code, notes, and snippets.

View yashishandilya's full-sized avatar
constantly improving

Yashi Shandilya yashishandilya

constantly improving
  • San Francisco, CA
  • 05:03 (UTC -05:00)
View GitHub Profile
@ryanhanwu
ryanhanwu / index.js
Created January 29, 2021 03:01
Hubspot Code Assessment
const fetch = require('node-fetch');
const dayjs = require('dayjs')
const DATASET_API = "https://candidate.hubteam.com/candidateTest/v3/problem/dataset?userKey=USER_KEY"
const RESULT_API = "https://candidate.hubteam.com/candidateTest/v3/problem/result?userKey=USER_KEY"
const findIdealStartDatePartners = (country, partners) => {
let partnersByDate = {}
let mostAvailDate = null
let maxAttendee = -1
@nicknapoli82
nicknapoli82 / cs50_Tideman_cycle-explanation.md
Last active April 26, 2026 18:22
My attempt at clarifying how cycles work for the Tideman algorithm

A Way to Look at Tideman Lock Pairs

I've observed that there is a little bit of a disconnect in understanding what it is that needs to be done to properly implement the lock_pairs function for cs50 Tideman. The goal of this little write-up is simply an attempt at explaining what the problem actually is, and why a cycle imposes a problem.

First:
If you are unfamiliar with the actual problem, or have not read through the entire cs50 Tideman problem description. Then I think you should start there.
cs50 Tideman

Second:
This little write-up is only narrowing in on the idea of cycles, and a way to think about what a cycle is and determine if locking a pair in the pairs array would create that cycle. This does not talk about any other part of the Tideman problem.

@nicknapoli82
nicknapoli82 / pointers.md
Last active June 15, 2022 13:59
Just a look at pointers in the c language. An attempt at clarifying what is going on in memory.

A simple look at pointers in C

Consider this simple snippet of code

int a = 5; 
int* b;
int c;
b = &c

Crudely drawn. If you think about memory like a char array. Then
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

@jvns
jvns / executing-file.md
Last active December 30, 2025 11:27
What happens when I run ./hello