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
{ | |
"workbench.colorTheme": "Default Light+", | |
"workbench.colorCustomizations": { | |
"editor.background": "#f1f1f1", | |
}, | |
"editor.tokenColorCustomizations": { | |
"variables": "#000000", | |
"keywords": "#0086a4", | |
"comments": "#c1c1c1", | |
"functions": "#980000", |
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
package main | |
import ( | |
"bufio" | |
. "fmt" | |
"os" | |
"math" | |
) | |
var ( |
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
FROM python | |
RUN mkdir src | |
WORKDIR /src/ | |
COPY test.py . |
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
f = open("foo/config.json", "r") | |
print(f.read()) |
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: mypod | |
spec: | |
containers: | |
- name: mypod | |
image: test/map:1.0 | |
command: ["python", "/src/test.py"] | |
imagePullPolicy: Never |
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
int n; | |
int m; | |
int dx[4] = {-1, 0, 1, 0}; | |
int dy[4] = {0, 1, 0, -1}; | |
int Solution::black(vector<string> &A) { | |
n = A.size(); | |
if (n == 0) return 0; | |
m = A[0].length(); | |
vector < vector < bool > > visited(n, vector < bool > (m, false)); |
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
/* | |
Sample Input | |
10 | |
5 4 8 1 6 10 3 7 2 9 | |
Sample Output | |
PreOrder Recursive : | |
5 4 1 3 2 8 6 7 10 9 | |
PreOrder iterative : | |
5 4 1 3 2 8 6 7 10 9 |
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
/* | |
Below code is function which returns number of strongly connected components. | |
https://www.youtube.com/watch?v=TyWtx7q2D7Y | |
https://www.tutorialspoint.com/Tarjan-s-Algorithm-for-Strongly-Connected-Components | |
*/ | |
int id; | |
int ans; |
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
/* | |
Problems: | |
https://practice.geeksforgeeks.org/problems/left-view-of-binary-tree/1 | |
*/ | |
/* | |
SAMPLE INPUT | |
1 | |
8 | |
5 4 7 1 2 8 9 10 |
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
""" | |
Bhavik Dhandhalya | |
BITS Pilani, ME Computer Science batch 2020 | |
""" | |
from fractions import gcd | |
from random import randint | |
import time | |
def f(x, c, n): | |
return (x ** 2 + c) % n |