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
#include <iostream> | |
#include <algorithm> | |
#include <vector> | |
using namespace std; | |
using vi = vector<string>; | |
using pii = pair<int,int>; | |
using vpii = vector<pii>; |
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
class Solution { | |
public: | |
int minAreaRect(vector<vector<int>>& points) { | |
if(points.size() < 4) | |
return 0; | |
unordered_map <int, unordered_map<int, bool>> side; | |
for(int i = 0; i < points.size(); i++) { | |
side[points[i][0]][points[i][1]] = true; | |
} |
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://web.stanford.edu/class/cs9/lectures/RecursionProbSetA.pdf | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
class Solution { | |
public: | |
enum TypeParenthesis {Open = 1, Close = -1}; | |
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 cv2 as cv | |
import numpy as np | |
from matplotlib import pyplot as plt | |
class ImageProcessor: | |
def __init__(self, pathImg): | |
self.img = cv.imread(pathImg, 0) | |
self.img = cv.medianBlur(self.img, 5) |
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://icpcarchive.ecs.baylor.edu/external/23/2301.pdf | |
#include <bits/stdc++.h> | |
using namespace std; | |
set <string> sequences; | |
int n; | |
string start, endW; |
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
#include <iostream> | |
using namespace std; | |
void insertIntIntoCharArr(int num, char arr[], int &pos) | |
{ | |
while(num > 0) | |
{ | |
arr[pos++] = num % 10 + 48; | |
num /= 10; | |
} |