Skip to content

Instantly share code, notes, and snippets.

@tanmai-h
tanmai-h / patients-postman-collection.json
Created February 3, 2024 17:14
patients-api postman collection
{
"info": {
"_postman_id": "f7cb5d6c-7074-48f1-8130-1d31177df3bb",
"name": "Patients API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "32743466"
},
"item": [
{
"name": "Patients Filter Batch",
---------------------------SERVER-------------------------------
================Round: 1 ================
Enter challenge c:
0
Y^2 mod n = 225
XV^2 mod n = 225
Correct response for challenge in round 1
================Round: 2 ================
Enter challenge c:
0
#include <GL/glut.h>
#include <stdio.h>
#define sq(a) (a)*(a)
int x1, y1, x2, y2;
void myInit() {
glClear(GL_COLOR_BUFFER_BIT);
glClearColor(0.0, 0.0, 0.0, 1.0);
{"version":1,"resource":"file:///Users/vharish/dev/authz-decision-service/server/src/test/java/com/intuit/authorization/akka/RequestCoalescingActorTest.java","entries":[{"id":"cTQQ.java","timestamp":1687938162627},{"id":"Qx54.java","timestamp":1687938185263}]}
@tanmai-h
tanmai-h / week8.cpp
Created October 29, 2018 14:16
IEEE codebuddy
//https://www.interviewbit.com/problems/identical-binary-trees/
int check(TreeNode *A, TreeNode *B) {
if (A != NULL && B != NULL) {
if(A->val == B->val) {
return check(A->left, B->left) && check(A->right, B->right);
}
else {
return false;
}
@tanmai-h
tanmai-h / week7.cpp
Created October 29, 2018 14:13
IEEE codebuddy
//https://www.interviewbit.com/problems/level-order/
vector<vector<int> > Solution::levelOrder(TreeNode* A) {
queue <TreeNode *> Q;
vector<vector<int> > vec;
int i = 0;
Q.push(A);
while(!Q.empty()) {
int s = Q.size();
while(s > 0) {
@tanmai-h
tanmai-h / Week6.cpp
Last active October 20, 2018 11:31
IEEE codebuddy
#define mod 1000000007
int Solution::cntBits(vector<int> &A) {
long long int s = 0, n = 32,
ones=0, zeroes=0;
while(n--) {
ones =0; zeroes=0;
for(int i = 0; i < A.size(); i++) {
if(A[i]%2 == 1){
ones++;
@tanmai-h
tanmai-h / week5.py
Created October 13, 2018 15:48
IEEE codebuddy
#https://www.interviewbit.com/problems/rain-water-trapped/
def find(l):
s = 0
n = len(l)
left = [0 for i in range(0, n)]
right = [0 for i in range(0, n)]
left[0] = l[0]
for i in range(1, n):
#left[i] = max(m, l[i-1])
@tanmai-h
tanmai-h / week3.cpp
Last active September 15, 2018 11:17
IEEE codebuddy
#include <algorithm>
//https://www.interviewbit.com/problems/3-sum/
int Solution::threeSumClosest(vector<int> &A, int B) {
sort(A.begin(), A.end());
//for(int i = 0; i < A.size(); i++) cout << A[i] <<" ";
//cout << "\n";
long long current = 0, sum = 10*B;
int flag = 0;
for(int i = 0; i < A.size(); i++) {
int l = i+1, r = A.size()-1;
@tanmai-h
tanmai-h / week2.cpp
Last active September 8, 2018 11:10
IEEE codebuddy Week 2
//https://www.interviewbit.com/problems/sorted-permutation-rank/
// ascii(z) = 122;
int Solution::findRank(string A) {
long long int s = 0, mod = 1000003, f[A.size()], count[123] = {0};
for(int i = 0; i < A.size(); i++) {
count[A[i]]++;
f[i] = 1;
}