Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Quinston Pimenta graphoarty

🎯
Focusing
Block or report user

Report or block graphoarty

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:2c74b6605874629d9f6fd0b186ea431c
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
static Scanner scan;
public static void main(String[] args) {
scan = new Scanner(System.in);
ArrayList<Integer> factors = new ArrayList<Integer>();
View gist:adb11e34d6a321d5a9544b20555892c6
import random
matrix = [[0 for x in xrange(5)] for x in xrange(5)]
visited = [[0 for x in xrange(5)] for x in xrange(5)]
def printMatrix(toPrint):
for x in range (0, 5):
for y in range (0, 5):
print toPrint[x][y],
print
def RecursiveLoop(a, b):
coorD = 0;
View gist:b6c7cd20a55bb979354a008f02392004
def cartesianProduct(setA, setB):
if len(setA) == 0:
return None
if len(setB) == 0:
return None
product = []
for elementA in setA:
View gist:c887f892965dc6e8b33494a18820fe18
def main():
count = int(raw_input("How many numbers do you want to print?"))
if count == 0:
print "No Numbers Printed"
else:
a = 0
b = 1
print a,
if count > 1:
print b,
View gist:5ace6fc1dd2740106ee5e022ecc4ddfb
public class Main {
/* Static variable which acts as the pointer for the postOrder list */
static int preIndex = 5;
public static void main(String[] args) {
/* InOrder Array */
char[] inOrder = { 'D', 'B', 'E', 'A', 'F', 'C' };
/* PostOrder Array */
View gist:020d56061279717488c840aa868a4930
public class SelectionSort {
public static final int max = 10;
public static void main(String[] args){
int[] toSortArray = new int[max];
int min=999;
int minIndex = 0;
View gist:94d2be78c6ac0ba07a62111f0a6b3187
public class Queue {
//initialize
//enqueue
//dequeue
//empty
//print
//adjustQueue
static final int max = 10;
View gist:d01f9bf32967232b858377a07a3ee6a3
public class QuickSortTest {
public static final int max = 10;
public static void main(String[] args){
int[] toSortArray = new int[max];
for(int i = 0; i < max; i++){
View gist:c74e6ed470cc6afef4e8f165dd3549d7
import random
#the sort function
def sort(array):
#the length of the array
length = len(array)
#for loop which ranges from
#1 to the length of the array
#this loop is to cover each and
#every number and ensure its
View gist:dea2e05bc3d184a2d05b12d22e545f2e
/*Import house keeping stuff that we need to connect with the Database*/
import java.sql.*;
/*Import Scanner Class so as to take input from the user*/
import java.util.Scanner;
public class Main {
static Connection connection;
static Scanner scan;
static Statement statement;
You can’t perform that action at this time.