Skip to content

Instantly share code, notes, and snippets.

View adist98's full-sized avatar

Aditya Soni adist98

  • Bangalore, India
View GitHub Profile
/* Function to calculate x raised to the power y in O(logn)*/
int power(int x, unsigned int y)
{
int temp;
if( y == 0)
return 1;
temp = power(x, y/2);
if (y%2 == 0)
return temp*temp;
else
@adist98
adist98 / Code.cpp
Created January 4, 2018 21:50
Go to codes.
// Singly Linked List implementation in c++
#include <iostream>
using namespace std;
struct node
{
int data;
node *next;