Skip to content

Instantly share code, notes, and snippets.

View pratikpc's full-sized avatar

Pratik Chowdhury pratikpc

View GitHub Profile
#include <math.h>
#include <stdio.h>
void Display (unsigned char* result, unsigned count)
{
for (unsigned i = 0; i < count; ++i)
printf ("%d", result[i]);
printf ("\n");
}
#include <math.h>
#include <stdio.h>
// We know
// 2^k >= n + k + 1
unsigned GetKFromN (unsigned n)
{
for (unsigned k = 0;; ++k)
{
unsigned rhs = n + k + 1;