Skip to content

Instantly share code, notes, and snippets.

@chuchao333
chuchao333 / exercise_web_crawler.go
Created April 11, 2020 18:33
The Web Crawler exercise from "A Tour of Go"
package main
import (
"fmt"
"sync"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.
@chuchao333
chuchao333 / Curator525.java
Created March 31, 2020 20:20
curator-525-potential-fix
void validateConnection(KeeperState sate, bool fromCodeToState) {
  ...
  else if (state == Watcher.Event.KeeperState.Expired)
{
if (fromCodeToState && client.isConnected())
// ignore
else
// fire a LOST as it is now      

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@chuchao333
chuchao333 / system_design_resources.md
Last active March 13, 2022 15:22
System Design Resources

Facebook related

解System Design题是个交流的过程,或者说是给出方案然后获取反馈的不断循环的过程。 一般的流程: 首先你要问清楚requirement; 然后可以讲一下high level architecture,就是分成哪几个component,互相之间如果 interact,在白板上画一画; 之后面试官可能会让你深入某个component detail讨论; 也有可能变换requirement让你重新设计

@chuchao333
chuchao333 / scala_topics.md
Last active August 29, 2015 14:20
Scala Topics
@chuchao333
chuchao333 / 20150304.md
Created March 4, 2015 07:19
Daily Reading -- 20150304
@chuchao333
chuchao333 / LeetCode_Stats.md
Last active August 29, 2015 14:16
Statistics of LeetCode submissions

Binary Search

Search Insert Position: 1 CE, 1 TLE, 1 AC

Search for a Range: 1 CE, 1 WA, 1 AC, 1 AC (binary search twice)

Search in Rotated Sorted Array: 3 WA, 1 AC

Search in Rotated Sorted Array II: 2 WA, 1 TLE, 2 WA, 1 AC (sequencial search), 1 AC