Skip to content

Instantly share code, notes, and snippets.

View AnimeshShaw's full-sized avatar
🏠
Working from home

Animesh Shaw AnimeshShaw

🏠
Working from home
View GitHub Profile
@AnimeshShaw
AnimeshShaw / JStackArray.java
Created June 19, 2015 10:38
JStack Implementation in Array
package com.codehackersblog.stack;
import java.util.Scanner;
/**
*
* @author Psycho_Coder
*/
public class JStackArray implements StackInterface {
package com.codehackersblog.stack;
/**
*
* @author PsychoCoder
*/
public interface StackInterface {
/**
*
@AnimeshShaw
AnimeshShaw / GuessNumberOutput.txt
Created June 17, 2015 09:03
Guess The Number Game Output
_____ _ _____ ____ ____ _____ _ _____
/ __// \ /\/ __// ___\/ ___\ /__ __\/ \ /|/ __/
| | _| | ||| \ | \| \ / \ | |_||| \
| |_//| \_/|| /_ \___ |\___ | | | | | ||| /_
\____\____/\____\____/\____/ \_/ \_/ \|\____\
_ _ _ ____ _____ ____
/ \ /|/ \ /\/ \__/|/ _ \/ __// __\
| |\ ||| | ||| |\/||| | //| \ | \/|
| | \||| \_/|| | ||| |_\| /_ | /
@AnimeshShaw
AnimeshShaw / GuessTheNumber.py
Created June 17, 2015 08:59
Guess The Number Game
import random
title = '''
_____ _ _____ ____ ____ _____ _ _____
/ __// \ /\/ __// ___\/ ___\ /__ __\/ \ /|/ __/
| | _| | ||| \ | \| \ / \ | |_||| \
| |_//| \_/|| /_ \___ |\___ | | | | | ||| /_
\____\\____/\____\\____/\____/ \_/ \_/ \|\____\
_ _ _ ____ _____ ____
@AnimeshShaw
AnimeshShaw / BagTest.java
Created June 15, 2015 15:54
Bag DataStructure Test File
package com.codehackersblog.test;
import java.util.Iterator;
import com.codehackersblog.Bag.Bag;
/**
*
* @author psychocoder
*/
@AnimeshShaw
AnimeshShaw / Img2Ascii.java
Created June 15, 2015 10:59
Image to Ascii Art in Java
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import javax.imageio.ImageIO;
public class Img2Ascii {
@AnimeshShaw
AnimeshShaw / DragonCurve.java
Last active August 29, 2015 14:23
Modified Dragon Fractal in Java
package dragon;
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
@AnimeshShaw
AnimeshShaw / DragonCurve.java
Last active July 5, 2017 10:25
Dragon Fractal in Java
package dragon;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.image.BufferedImage;
import java.io.File;
@AnimeshShaw
AnimeshShaw / StringPermLexico.c
Created June 14, 2015 18:25
String Permutation Lexicographically in C
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
/* Following function is used by the library qsort() function to sort an array of chars */
int compare (const void * a, const void * b);
/* this function recursively prints all repeated permutations of the given string.*/
void LRecurse (char *str, char* data, int last, int index)
{
@AnimeshShaw
AnimeshShaw / StringPerm.cpp
Last active August 29, 2015 14:23
String Permutation in C++
#include <iostream>
#include <cstring>
void swap(char* src, char* dst)
{
char ch = *dst;
*dst = *src;
*src = ch;
}