Skip to content

Instantly share code, notes, and snippets.

@mdtareque
mdtareque / Algo
Last active September 5, 2021 14:33
kadane https://leetcode.com/submissions/detail/545186446/
sudoku solver https://leetcode.com/submissions/detail/542160718/
cantor's diagonalization https://leetcode.com/problems/find-unique-binary-string/discuss/1418687/Detailed-Explanation-O(N)-Java-C%2B%2B-Python-short-concise-code-Cantor's-Diagonalization
unexpected binary search
https://leetcode.com/submissions/detail/539776707/
normalize array https://www.geeksforgeeks.org/count-inversions-array-set-3-using-bit/
import os
primes=set()
def p(n):
while n%2 == 0:
n = n//2
if (n == 1): return True
limit = n//2
for j in range(3, limit, 2):
@mdtareque
mdtareque / macVerbalFeedback.sh
Created August 19, 2020 02:24
mac verbal feedback
#https://askubuntu.com/questions/873719/how-to-set-a-variable-to-a-random-value-with-bash
#https://stackoverflow.com/questions/16553089/dynamic-variable-names-in-bash
#http://mywiki.wooledge.org/BashFAQ/006#Indirection
#declare "magic_variable_$1=v$(( $RANDOM % 1000 ))" ; var="magic_variable_$1"; echo "${!var}"
#read ${!var}
#echo $v396
@mdtareque
mdtareque / 1.Azmat-e-Quran.md
Last active April 25, 2023 17:50
Dr Israr Ahmed bayaan gist

A Series of 9 Lectures by Dr. Israr Ahmed at Abu Zahbi UAE (1985)

Lecture 1: Azmat-e-Quran https://www.youtube.com/watch?v=i_GB7W-m2oY&t=4781s

3:40 to 7:00 Background of lecture series (9 day program) Many urdu/farsi Allama Iqbal Sher scattered through out the lecture.

7:00 to 7:30 Major two sections of this lecture explained in short

First Section 7:30 onwards:

[ ] - static codejam problem categorization data/filter/tabular view via json + github pages [ ] -

@mdtareque
mdtareque / LeetCode Notes
Last active April 29, 2020 07:21
Exceptional Templates code seen
max money
https://leetcode.com/problems/house-robber-iii/discuss/79330/Step-by-step-tackling-of-the-problem
best time to buy sell stock
https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/discuss/108870/Most-consistent-ways-of-dealing-with-the-series-of-stock-problems
at most k transactions with stack n heap
https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/discuss/54118/c-solution-with-on-klgn-time-using-max-heap-and-stack
@mdtareque
mdtareque / CJ_download.js
Last active April 20, 2020 22:33
tamper monkey script coding
// ==UserScript==
// @name me download solution cj
// @namespace mtk
// @version 0.1
// @description download solution cj
// @author You
// @match https://codingcompetitions.withgoogle.com/*/submissions/*
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// ==/UserScript==
@mdtareque
mdtareque / bashrc
Last active June 17, 2020 06:31
Bashrc - color, alias
export PATH="$PATH":~/bin
bold=$(tput bold)
#normal=$(tput sgr0)
normal=$'\e[0m' # (works better sometimes)
bold=$(tput bold) # make colors bold/bright
red="$bold$(tput setaf 1)" # bright red text
green=$(tput setaf 2) # dim green text
fawn=$(tput setaf 3); beige="$fawn" # dark yellow text
yellow="$bold$fawn" # bright yellow text
darkblue=$(tput setaf 4) # dim blue text
{
"AWSTemplateFormatVersion": "2010-09-09",
"Metadata": {
"AWS::CloudFormation::Designer": {
"28274dc9-0e15-452e-a9df-c414c5ece700": {
"size": {
"width": 60,
"height": 60
},
"position": {
@mdtareque
mdtareque / quranSurahBenefits.md
Created June 12, 2019 16:33
Contains data compiled from lectures by Mufti Muneer Ahmed Akhoon - Raham TV. youtube playlist by https://www.youtube.com/playlist?list=PLAko-gSS9VlzNfQnsHCoCrIperV2hCJl1

Note

  • As of June 2019, the youtube playlist contained 70 videos.
  • The videos have general format as below for each surah a. a short description of surah, order in Quran. b. a brief description of when/how/where it was revealed. c. Benefits/virtues of reading/memorizing/writing it. d. interpretation if seen in dream.

| Surah Name | Video no | Makki/Madani(No of Surah) | OrderInQuran/OrderOfRevelation | Benefits | comments