https://github.com/marselester/interview
Interview notes.
https://github.com/marselester/interview
Last synced: about 1 month ago
JSON representation
Interview notes.
- Host: GitHub
- URL: https://github.com/marselester/interview
- Owner: marselester
- Created: 2020-11-18T19:10:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-23T22:07:27.000Z (over 2 years ago)
- Last Synced: 2024-06-21T20:07:25.330Z (11 months ago)
- Language: Go
- Homepage:
- Size: 319 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Interview
Interview notes and Go implementation of a few problems from Elements of Programming Interviews.
Table of content:
- [Site reliability engineering](notes/sre.md)
- [Systems performance](notes/sysperf.md)
- [Linux](notes/linux.md)
- [Consistency](notes/consistency.md)
- [Postgres](notes/postgres.md)
- [Probability theory](notes/prob.md)
- [Algorithms](https://github.com/marselester/alg)
- [Primitive types](#primitive-types)
- [Bitwise operation](notes/bits.md)
- [Arrays](#arrays)
- [Linked lists](#linked-lists)
- [Sorting](#sorting)
- [Searching](#searching)
- [Tests](#tests)
- [Benchmarks](#benchmarks)## Primitive types
Bitwise operation problems:
- **[count bits](primitive/count_bits.go)**
— count the number of bits that are set to 1 in a non-negative integer
- **[parity](primitive/parity.go)**
— compute parity of a non-negative integer (1 if set bits are odd)
- **[swap bits](primitive/swap_bits.go)**
— swap i-th and j-th bits of an integer## Arrays
Array problems:
- **[even odd](array/even_odd.go)**
— reorder an array of integers so that even integers appear first
- **[Dutch flag](array/dutch_flag.go)**
— reorder an array of integers so that integers smaller than pivot appear first,
then integers that equal to pivot, and finally integers larger than pivot## Linked lists
Linked list problems:
- **[reverse](linkedlist/reverse.go)**
## Sorting
Sorting problems:
- **[h-index](sorting/h_index.go)**
— calculate h-index metric that measures both productivity and citation impact of a researcher## Searching
Searching problems:
- **[sum 2020](searching/sum2020.go)** (advent of code)
— find two/three numbers that add up to 2020## Tests
Each solution is covered with a few tests.
```sh
$ go test ./primitive
```Go EPI Judge helps to make sure solutions pass all the test cases from EPIJudge repository (csv files).
```sh
$ git clone https://github.com/stefantds/go-epi-judge.git
$ git clone https://github.com/adnanaziz/EPIJudge.git
$ cat > go-epi-judge/config.yml <