Skip to content

Instantly share code, notes, and snippets.

View GSkoba's full-sized avatar
👨‍💻
looking for relocation

Grigoriy Skobelev GSkoba

👨‍💻
looking for relocation
View GitHub Profile
@GSkoba
GSkoba / gist:491a3e5376ac6a0dc6782554a64ae87c
Created September 6, 2022 09:49
Публичное собеседование по LeetCode 05.09
# hi! I'm here!
Sliding Window Maximum, k = 3
```
Window position Max
--------------- -----
[1 3 -1] -3 5 3 6 7 3
1 [3 -1 -3] 5 3 6 7 3
1 3 [-1 -3 5] 3 6 7 5
@GSkoba
GSkoba / gist:3de05b4bdeb26beb4abfdd677b4d0da1
Last active August 27, 2022 17:07
Public Interview LeetCode 27 Aug
https://leetcode.com/problems/deepest-leaves-sum/
1. In root (bin tree)
Сумму самых глубоких вершин в этом дереве
2
/ \
1 3
/ / \
public class TopGrishaShop {
private static int count = 1;
static class User {
String userName;
public User(String userName) {
this.userName = userName;
}
@GSkoba
GSkoba / Fibo
Created November 22, 2020 18:39
Fibonacci number
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
public class Fibo {
Map<Integer, BigInteger> map = new HashMap<>();
private BigInteger calcFibo(int arg) throws IllegalAccessException {
if (arg < 1) throw new IllegalAccessException();