This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TopGrishaShop { | |
private static int count = 1; | |
static class User { | |
String userName; | |
public User(String userName) { | |
this.userName = userName; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://leetcode.com/problems/deepest-leaves-sum/ | |
1. In root (bin tree) | |
Сумму самых глубоких вершин в этом дереве | |
2 | |
/ \ | |
1 3 | |
/ / \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |