Skip to content

Instantly share code, notes, and snippets.

View rr-paras-patel's full-sized avatar
🌎

Paras Patel rr-paras-patel

🌎
  • Rakuten Inc.
  • SF Bay Area, USA
View GitHub Profile
#include<stdio.h>
#include<string.h>
void reverse(char *string);
int main()
{
char origStr1 [] = "abcdfsdfsfd";
char origStr2 [] = "a";
char *origStr3 = NULL;
reverse(origStr1);
@rr-paras-patel
rr-paras-patel / StringReverse.java
Last active March 13, 2016 14:46
1.2 Write code to reverse a C-Style String. (C-String means that “abcd” is represented as !ve characters, including the null character.)
public class StringReverse {
public static void main(String args[]){
String s = "this is a demo test!";
System.out.println(reverse(s));
}
public static String reverse(String input){
char[] data = input.toCharArray();
int i = 0;
int j = data.length - 1;
from decimal import *
import sys
# Define your denominations to be used
denominations = ['500', '100', '50', '20', '10', '5', '2', '1', '0.25', '0.10', '0.05', '0.01']
# Please write this denomination list in Desending order of currency value
names = {'0.25': "quarters", '0.10': "dimes", '0.05': "nickels", '0.01': "pennies"}
# Specify special nameing for your values otherwsie default is 'dollar'
amount="5532.23$" ## we may also define command line input e.g. sys.argv[1]
@rr-paras-patel
rr-paras-patel / gist:2366fe4e8b3acbc8d4ef
Created September 22, 2014 01:48
Tmux installation - CentOS
#!/bin/bash
wget http://downloads.sourceforge.net/tmux/tmux-1.8.tar.gz
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar zxvf tmux-1.8.tar.gz
tar zxvf libevent-2.0.21-stable.tar.gz
yum install gcc kernel-devel make ncurses-devel -y