{{ message }}

Instantly share code, notes, and snippets.

💭
Be there and give a shit

Felipe Oliveira feliperazeek

💭
Be there and give a shit
Created Jul 22, 2021
 { "type" : "record", "name" : "twitter_schema", "namespace" : "foo.bar", "fields" : [ { "name" : "username", "type" : "string", "doc" : "Name of the user account on Twitter.com" }, { "name" : "tweet",
Created Nov 30, 2016
View gist:5e621cd3245fae4723d2f943b040efde
 ### My publicly-auditable identity: https://keybase.io/felipera ### From the command line: Consider the [keybase command line program](https://keybase.io/download). ```bash # look me up
Created Oct 27, 2016
HackerRank - Cracking the Code Interview - Sorting: Bubble Sort (https://www.hackerrank.com/challenges/ctci-bubble-sort)
View gist:8feb499216851612ed9de2def805aaae
 import java.io.*; import java.util.*; public class Solution { private static void work(int[] a) { int swaps = 0; int n = a.length;
Created Oct 18, 2016
HackerRank - Cracking the Code Interview - Time Complexity: Primality (https://www.hackerrank.com/challenges/ctci-big-o)
View Solution.java
 import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { private static boolean isPrime(int n) { if (n <= 1) return false;
Created Oct 18, 2016
HackerRank - Cracking the Code Interview - Bit Manipulation: Lonely Integer (https://www.hackerrank.com/challenges/ctci-lonely-integer)
View Solution.java
 import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static int lonelyInteger(int[] a) { int i = 0;
Created Oct 15, 2016
HackerRank - Cracking the Code Interview - Queues: A Tale of Two Stacks (https://www.hackerrank.com/challenges/ctci-queue-using-two-stacks)
View Solution.java
 import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { private static class MyQueue {
Created Oct 14, 2016
HackerRank - Cracking the Code Interview - Sorting: Comparator (https://www.hackerrank.com/challenges/ctci-comparator-sorting)
View Checker.java
 public class Checker implements Comparator { public int compare(Player p1, Player p2) { int score = Integer.compare(p2.score, p1.score); if (score != 0) return score; else return p1.name.compareTo(p2.name); } public static void main(String[] args) { Scanner scan = new Scanner(System.in);
Created Oct 14, 2016
HackerRank - Cracking the Code Interview - Stacks: Balanced Brackets (https://www.hackerrank.com/challenges/ctci-balanced-brackets)
View Solution.java
 import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { private static List openChars = new ArrayList(Arrays.asList('{', '(', '[')); private static List closeChars = new ArrayList(Arrays.asList('}', ')', ']'));
Created Oct 14, 2016
HackerRank - Cracking the Code Interview - Arrays: Left Rotation (https://www.hackerrank.com/challenges/ctci-array-left-rotation)
View Solution.java
 import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static int[] arrayLeftRotation(int[] a, int n, int k) { if (k < 0) throw new RuntimeException("K needs to be greater than zero");
Created Oct 14, 2016
HackerRank and Cracking the Code Interview's Hash Tables: Ransom Note (https://www.hackerrank.com/challenges/ctci-ransom-note)
View Solution.java
 import java.util.*; public class Solution { Map magazineMap; Map noteMap; public Solution(String magazine, String note) { magazineMap = new HashMap(); noteMap = new HashMap();