freeCookie


freeCookie_🍪

Leetcode - Course Schedule

Course Schedule - topologicalsort

LC207. Course Schedule Topological Sort Topological sort via dfs There are a total of n courses you have to take, labeled from 0 to n - 1. Some ...

Using Database with Python Week3

Datebase design

Database Design Building a Data Model: Basic Rule: Don’t put the same string data in twice - use a relationship instead Database Normalizati...

Segment Tree || Binarty Index Tree

线段树和树状数组

Segment Tree 线段树 wiki定义 GeeksforGeeks Efficient and easy segment trees 线段树是一种平衡二叉树,对于每一个非叶子节点[a, b],左子树表示区间[a, (a+b)/2], 右子树表示区间[(a+b)...

LC57. Insert Interval

Insert interval with merge

Insert Interval Question Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume ...

LC127. Word Ladder

Word Ladder I - one of solution

Word Ladder I 先做了Word Ladder II, 很 naive的以为是一种做法。当然不是了 Question Given two words (beginWord and endWord), and a dictionary’s word list, find the ...

Using Database with Python Week2

Relational Databases and SQLite

Relational Databases and SQLite Definition: Database - contains many tables • Relation (or table) - contains tuples and attributes • Tup...

Using Database with Python Week1

Object Oriented Python

OO Python Week1 Object: Contains: Code and data Key aspect: break problem into small understandable parts Class/Method/Instances dir() Clas...

LC84/85. Maximal Rectangle || Max rectangle in Histogram

Find maximal rectangle in matrix/array

Maximal Rectangle Question Find the largest area of 1s rectangle in a char int😢  matrix Example 0110 0110 Return 4 Analysis Java solut...