Skip to content

Instantly share code, notes, and snippets.

View sreedharmb's full-sized avatar

Sreedhar M B sreedharmb

  • Knolskape
  • Bangalore, India
View GitHub Profile

Setup instructions for simulations

Apache

sudo apt-get install apache2

MYSQL

<?php
require("./amazon-sdk/sdk.class.php");
// on ubuntu - this script can be run using php5-cli and php5-curl
//Provide the Key and Secret keys from amazon here.
$AWS_KEY = "kkk";
$AWS_SECRET_KEY = "kkkk+xKcdkB";
//certificate_authority true means will read CA of amazon sdk and false means will read CA of OS
$CA = true;
@sreedharmb
sreedharmb / maximum product
Created September 16, 2012 06:06
You are given an integer s and an integer k. Find k positive integers a1, a2, ..., ak such that their sum is equal to s and their product is the maximal possible.
int product(int s,int k)
{
int temp=0;
int i,max;
if(k==1)
return s;
else
{
for(i=1;i<s;i++)
{