Skip to content

Instantly share code, notes, and snippets.

View willshw's full-sized avatar
⌨️
Code, code, code

William Wang willshw

⌨️
Code, code, code
View GitHub Profile
@willshw
willshw / private_fork.md
Created November 22, 2022 18:00 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@willshw
willshw / quick_sort.md
Last active August 25, 2021 03:53
Quick Sort
def quickSort(self, A, start, end):
  if start >= end:
      return

  left, right = start, end
  # key point 1: pivot is the value, not the index
  pivot = A[(start + end) // 2]

 # key point 2: every time you compare left & right, it should be 
@willshw
willshw / merge-sort.md
Last active August 25, 2021 03:54
merge sort explained

Merge Sort

Merge sort is a divide and conquer algorithm for sorting a array of elements. Typically, it proceed like this,

  1. Breaks array into two half size arrays
  2. Breaks the half size arrays repeatedly until array reach size of 1
  3. Merge the arrays, comparing the elements, starting from size 1 and work the level up
  4. Finaly merged array is a sorted array

Time and Space Complexity

Time:

@willshw
willshw / .git-commit-template
Created April 26, 2019 14:22 — forked from zakkak/.git-commit-template
This commit message template that helps you write great commit messages and enforce it across your team.
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char)
# |<---- Preferably using up to 50 chars --->|<------------------->|
# Example:
# [feat] Implement automated commit messages
# (Optional) Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# (Optional) Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23