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
/*HOSPITAL MANAGEMENT SYSTEM*/ | |
CREATE DATABASE IF NOT EXISTS `hospital`; | |
USE `hospital`; | |
-------------------------------------------------------- | |
/*creating entities*/ | |
-------------------------------------------------------- | |
CREATE TABLE IF NOT EXISTS `patient` ( |
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
bool differByOneChar(string &a, string &b){ | |
int diff = 0; | |
for(int i=0; i<a.size(); ++i){ | |
if(a[i]!=b[i]) diff++; | |
if(diff>1) return false; | |
} | |
return diff==1; | |
} | |
int dfsHelper(unordered_map<string, vector<string>> &adj, string A, string B){ | |
queue<string> s; |
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
#define deb(x) cout << #x << " " << x << endl; | |
vector<pair<int, int>> getDirs(pair<int, int> cur, int row, int col){ | |
vector<pair<int, int>> dirs; | |
if(cur.first+1<row) dirs.push_back({cur.first+1, cur.second}); | |
if(cur.first-1>=0) dirs.push_back({cur.first-1, cur.second}); | |
if(cur.second+1<col) dirs.push_back({cur.first, cur.second+1}); | |
if(cur.second-1>=0) dirs.push_back({cur.first, cur.second-1}); | |
return dirs; |
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 pandas as pd | |
import mysql.connector as msql | |
from mysql.connector import Error | |
import datetime | |
accountsData = pd.read_csv('/Users/vipul/Downloads/accounts_master.csv') | |
accountsData.drop(accountsData.columns[[7, 8]], axis = 1, inplace = True) | |
accountsData.dropna(subset = ["Account Name", "IP Domain", "SFDC Account ID"], inplace=True) | |
unravelData = pd.read_csv('/Users/vipul/Downloads/sir_unravel_v2.csv') | |
unravelData.drop_duplicates(subset ="OpenCX Buyer Id", keep = 'first', inplace = 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
#include<bits/stdc++.h> | |
#define MOD 1000000007 | |
map<long long, long long> dp; | |
long long ans(long long n){ | |
if(n<=2) { | |
dp[n]=1; | |
return dp[n]; | |
} | |
if(dp[n]) return dp[n]; | |
if(n%2==0){ |
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
{ | |
"entries": [ | |
{ | |
"b": 155, | |
"g": 183, | |
"label": "green-ish", | |
"r": 81, | |
"uid": "EjbbUhVExBSZxtpKfcQ5qzT7jDW2" | |
}, | |
{ |
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<bits/stdc++.h> | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#include <cstring> | |
#include <cstdlib> | |
#include <numeric> | |
#include <cmath> |
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
//HEADING: STRING MATCHING// | |
//PROBLEM STATEMENT: | |
/* | |
FIND THE NUMBER OF OCCURENCES OF A SUBSTRING IN A GIVEN STRING. | |
NUMBER OF OCCURENCES ALSO INCLUDE OVERLAPPING SUBSTRINGS. | |
NUMBER OF OCCURENCES ALSO INCLUDE REPETIIONS. | |
ALGORITHM RETURNS THE NUMBER OF SUCH OCCURENCES. | |
*/ |
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
##HEADING: STRING MATCHING | |
#PROBLEM STATEMENT: | |
""" | |
FIND THE NUMBER OF OCCURENCES OF A SUBSTRING IN A GIVEN STRING. | |
NUMBER OF OCCURENCES ALSO INCLUDE OVERLAPPING SUBSTRINGS. | |
NUMBER OF OCCURENCES ALSO INCLUDE REPETIIONS. | |
ALGORITHM RETURNS THE NUMBER OF SUCH OCCURENCES. | |
""" |
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<bits/stdc++.h> | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#include <cstring> | |
#include <cstdlib> | |
#include <numeric> | |
#include <cmath> |