Skip to content

Instantly share code, notes, and snippets.

View ChicagoDev's full-sized avatar
🇺🇸

Blake Gideon ChicagoDev

🇺🇸
View GitHub Profile
public class FindPairs {
public static int countPairs(int[] a) {
Integer[] pairsFound = new Integer[a.length];
// Get the ith item in the list
for (int i = 0; i < a.length; i++) {
public void function(int N) {
Stack<Integer> stack = new Stack<Integer>();
while (N > 0) {
stack.push(N % 2);
N = N / 2;
}
for (int b: stack) {StdOut.print(b);}
/******************************************************************************
* Compilation: javac LinkedStackOfStrings.java
* Execution: java LinkedStackOfStrings
* Data files: https://introcs.cs.princeton.edu/java/43stack/tobe.txt
*
* A stack of strings, implemented using a linked list.
*
* % more tobe.txt
* to be or not to - be - - that - - - is
*
/******************************************************************************
* Compilation: javac FixedCapacityStackOfStrings.java
* Execution: java FixedCapacityStackOfStrings
* Dependencies: StdIn.java StdOut.java
*
* Stack of strings implementation with a fixed-size array.
*
* % more tobe.txt
* to be or not to - be - - that - - - is
*
import edu.princeton.cs.algs4.In;
import edu.princeton.cs.algs4.Quick;
public class Filtering34 {
public static void minMaxFilter() {
In in = new In();
int max = in.readInt();
int min = max;
#include <stdio.h>
int main(int argc, char *argv[]) {
int fahr, celsius;
/*Accessing a c.l. arg: argv[n];*/
fahr = lower;
int main() {
int i, j, rows;
scanf("%d", &rows);
printf("\n");
}
}
int main() {
scanf("%d", &rows);
#include <stdio.h>
return 0;
for (j = 1; j <= i; ++j) {
}
}
for (i = rows; i >= 1; --i) {
}
int i, j, rows;
#! /Users/bgideon/PycharmProjects/KeywordComparison/venv/bin/python
### !!!! Your interpreter path will be different! Find it with `which python3`
import sys
def get_kws():
py_kws = []
c_kws = []
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.util.HashMap;