Avatar
Gao
  • C
  • C#

see more about me on my Github profile.


Java Stream

Streams A stream represents a sequence of elements and can perform a series of operations on them strings.stream() .filter(s -> !s.equals(""))...


MongoDB

Scalability NoSQL is intented to offer more scalability. A balance between the scalability and the consistency. Vertical Functional decomposition ...


Matrices in Computer Graphics

Matrix Transformations The matrices are used frequently in computer graphics and the matrix transformations are one of the core mechanics of any 3D...


Tree Diameter

Definition The diameter of a tree is the distance of the longest path between two end nodes $\arg\max_{(u, v) \in G}d(u, v)$, where $d(u, v)$ is the...


Google Foobar Decrypt Final Message

After i have finished Google Foobar challenge I get a encrypted message. The ciphertext was xored with my username and then encode with base64, just...


Google Foobar Dodge The Lasers

Beatty sequence This problem require to calculate $\sum_{i=1}^{n} \lfloor i\sqrt{2} \rfloor$. We must take into consideration the precision and the...


Google Foobar Escape Pods

This problem involves solving the equivalent maximum flow problem. We can use Ford–Fulkerson algorithm with BFS to calculate the total flow. Maximum...


Install Windows Sandbox in Windoes 10 Home Edition

save the following command as bat file and then execute @echo off echo Checking for permissions >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe"...


Google Foobar Free the Bunny Prisoners

Free the Bunny Prisoners Analysys The problem can be rearrange as follow: If you have N bunnies, and M locks, distribute M distinct keys among the...


Google Kickstart 2019 Round F Flattening

Google Kickstart 2019 Round F Flattening First, we find the major height $H_k$ from each position $i$ to each position $j$. The change is not more...