I hereby claim:
- I am roychowdhuryrohit-dev on github.
- I am rychwdhryrohit (https://keybase.io/rychwdhryrohit) on keybase.
- I have a public key ASCf_H7-lVL1ZavligGxiaxtExSPstjw9QRetZS9r8_WDQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
from math import ceil, log, sqrt | |
""" | |
This solution uses the closed form expression of the given linear recurrence relation. Some approximations has been made to calculate the nearest value of n. Unlike other solutions that use recursion or memoization techniques, this is a much more faster and efficient constant time O(1) solution (assuming real-valued arithmetic is constant time). | |
""" | |
phi = 4.561552813 | |
psi = 0.4384471872 | |
sq = sqrt(17) | |
def isPresent(k): | |
from hashlib import sha256 | |
import time | |
from json import dumps | |
# to define each blocks | |
class Block: | |
def __init__(self, data, prevHash=None): | |
self.data = data |
#include <stdio.h> | |
void sort(int pid[], int at[], int bt[], int n) { | |
int temp, i, j, flag; | |
for(i = 1;i<n;i++) { | |
flag = 1; | |
for(j = 0;j<(n-i);j++) { | |
if(at[j]>at[j + 1]) { | |
temp = pid[j]; | |
pid[j] = pid[j + 1]; | |
pid[j + 1] = temp; |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct { | |
int startTime, endTime, weight; | |
} Job; | |
struct S { | |
// current job, last job. | |
int cJob, lJob, weight; | |
} *jobSeq; | |
// Comparator function to be passed to qsort. |
#include <stdio.h> | |
#include <math.h> | |
#include <stdlib.h> | |
#define X 99 | |
// To reset the board and remove queens. | |
void reset(int *board, int dim) { | |
int i; | |
for(i = 0;i<dim;i++) { | |
board[i] = X; | |
} |
import java.util.*; | |
import java.text.*; | |
interface SavingsAccount | |
{ | |
final double rate = 0.04,limit = 10000,limit1 = 200; | |
void deposit(double n,Date d); | |
void withdraw(double n,Date d); | |
} | |
class Customer implements SavingsAccount | |
{ |
/* | |
* ----ROHIT ROY CHOWDHURY(Zeu5)---- | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct S | |
{ | |
int data; | |
struct S *l,*r; | |
} node; |