Skip to content

Instantly share code, notes, and snippets.

View rishpandey's full-sized avatar
🎯
Focusing

Rishabh Pandey rishpandey

🎯
Focusing
View GitHub Profile
package problems;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Scanner;
public class FileAppender {
public static void main(String[] args) {
InputStream in = System.in;
Scanner scanner = new Scanner(in);
package problems;
import java.util.Scanner;
import java.util.regex.Pattern;
public class StringConvertor {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int totalInputs = Integer.parseInt(scanner.nextLine());
cat source.csv | awk 'BEGIN{ FS=" *;"; OFS=";" } {$1=$1; print $0}' >> targetfile
@rishpandey
rishpandey / library.c
Created January 24, 2017 16:23
Library Management in C
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#define MAX 100
#define EXIT_CHOICE 10
#define USERS_FILE "users.txt"
#define BOOKS_FILE "books.txt"
@rishpandey
rishpandey / Test.java
Created July 7, 2016 05:44
Calculate Execution time
public class Test {
public static void main(String[] args) {
long startTime = System.nanoTime();
\\ Logic Here
long stopTime = System.nanoTime();
long elapsedTime = stopTime - startTime;