Skip to content

Instantly share code, notes, and snippets.

View graphoarty's full-sized avatar
🎯
Focusing

Quinston Pimenta graphoarty

🎯
Focusing
  • https://quinston.com
  • Pune, India
View GitHub Profile
#include <iostream>
#include <cmath>
using namespace std;
int jumpSearch(int L[], int length, int key){
int left = 0;
int right = sqrt(length);
while(right < length && L[right] <= key){
'''
Function Name: positiveBinaryConversion
Number of Parameters: 1
Type of Parameters: list
Return Value: list
Function Description: Increments a binary number by 1
'''
def incrementBinaryByOne(num):
num.reverse()
if num[0] == '0':
import java.util.Scanner;
public class DecimalToBinary {
static Scanner scan;
static int decValue;
static Stack stack;
public static void main(String[] args){
public class MergeSortTest {
public static final int max = 10;
public static void main(String[] args){
int[] toSortArray = new int[max];
//Required variables:
public class Main {
static final int MAX = 6;
static String words[];
public static void main(String[] args) {
float[] probabilityHit = new float[MAX];
float[] probabilityFailure = new float[MAX];
Node root = null;
words = new String[MAX];
import random
def main():
toSortArray = list()
counterArray = list()
sortedArray = list()
lengthOfArray = 10
for x in range(0, lengthOfArray):
toSortArray.append(random.randint(0,lengthOfArray-1))
counterArray.append(0)
#include<iostream>
using namespace std;
void shell_sort(int L[], int length){
int gap = length / 2;
while(gap > 0){
int j = 0;
import random
class Node:
def __init__(self, key):
self.key = key
self.vertical = None
def insertItemBetween(first, current, last):
first.vertical = current
current.vertical = last
import java.util.Scanner;
public class kruskal{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int[][] matrix = new int[5][5];
int[] parent = new int[5];
int min;
#include <iostream>
#include <cstring>
using namespace std;
char* getSubstring(char c[], int starting, int ending){
int length = ending - starting + 1;
int temp = length;
if(ending < starting){