Skip to content

Instantly share code, notes, and snippets.

View hassanejaz's full-sized avatar
☁️

Hassan Ejaz hassanejaz

☁️
View GitHub Profile
@hassanejaz
hassanejaz / csv
Created February 10, 2022 19:26
Leetcode 75 Questions
Video Solution Category Name Link Notes
https://youtu.be/KLlXCFG5TnA Arrays Two Sum https://leetcode.com/problems/two-sum/ use hash map to instantly check for difference value, map will add index of last occurrence of a num, don’t use same element twice;
https://youtu.be/1pkOgXD63yU Arrays Best Time to Buy and Sell Stock https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ find local min and search for local max, sliding window;
https://youtu.be/3OamzN90kPg Arrays Contains Duplicate https://leetcode.com/problems/contains-duplicate/ hashset to get unique values in array, to check for duplicates easily
https://youtu.be/bNvIQI2wAjk Arrays Product of Array Except Self https://leetcode.com/problems/product-of-array-except-self/ make two passes, first in-order, second in-reverse, to compute products
https://youtu.be/5WZl3MMT0Eg Arrays Maximum Subarray https://leetcode.com/problems/maximum-subarray/ pattern: prev subarray cant be negative, dynamic programming: compute max sum for each prefix
https://youtu.
@hassanejaz
hassanejaz / mac-setup.sh
Created February 1, 2022 17:07 — forked from patrickhulce/mac-setup.sh
GitHub Self-Hosted Runners
#!/bin/bash
# Non-scripted Tasks:
# - Configure device name in Preferences > Sharing
# - Enable Remote Login & Remote Management in Preferences > Sharing
# - Enable automatic login/disable password after sleep in Preferences > Security & Privacy > General
# - Disable screensaver/sleep in Preferences > Energy Saver
# - Disable spotlight indexing of home directory
# - Add a runner in GitHub UI to grab your token https://github.com/<org>/<repo>/settings/actions/add-new-runner
### Keybase proof
I hereby claim:
* I am hassanejaz on github.
* I am hassanejaz (https://keybase.io/hassanejaz) on keybase.
* I have a public key ASCT9xZbBh4am9_VW06pOTrvp5RQgD7LdF9zezcloLtUdQo
To claim this, I am signing this object:
@hassanejaz
hassanejaz / linux.md
Last active August 15, 2021 21:31
Linux Cheatsheet

#Linux Cheat Sheet

##File Commands:

  • ls – directory listing
  • ls -al – formatted listing with hidden files
  • cd dir - change directory to dir
  • cd – change to home
  • pwd – show current directory
  • mkdir dir – create a directory dir
  • rm file – delete file