diff --git a/Tutorials/10 Days of Statistics/Day 0 - Mean, Median, and Mode/Solution.java b/10 Days of Statistics/Day 0 - Mean, Median, and Mode/Solution.java similarity index 100% rename from Tutorials/10 Days of Statistics/Day 0 - Mean, Median, and Mode/Solution.java rename to 10 Days of Statistics/Day 0 - Mean, Median, and Mode/Solution.java diff --git a/Tutorials/10 Days of Statistics/Day 0 - Weighted Mean/Solution.java b/10 Days of Statistics/Day 0 - Weighted Mean/Solution.java similarity index 100% rename from Tutorials/10 Days of Statistics/Day 0 - Weighted Mean/Solution.java rename to 10 Days of Statistics/Day 0 - Weighted Mean/Solution.java diff --git a/Tutorials/10 Days of Statistics/Day 1 - Interquartile Range/Solution.java b/10 Days of Statistics/Day 1 - Interquartile Range/Solution.java similarity index 100% rename from Tutorials/10 Days of Statistics/Day 1 - Interquartile Range/Solution.java rename to 10 Days of Statistics/Day 1 - Interquartile Range/Solution.java diff --git a/Tutorials/10 Days of Statistics/Day 1 - Quartiles/Solution.java b/10 Days of Statistics/Day 1 - Quartiles/Solution.java similarity index 100% rename from Tutorials/10 Days of Statistics/Day 1 - Quartiles/Solution.java rename to 10 Days of Statistics/Day 1 - Quartiles/Solution.java diff --git a/Tutorials/10 Days of Statistics/Day 1 - Standard Deviation/Solution.java b/10 Days of Statistics/Day 1 - Standard Deviation/Solution.java similarity index 100% rename from Tutorials/10 Days of Statistics/Day 1 - Standard Deviation/Solution.java rename to 10 Days of Statistics/Day 1 - Standard Deviation/Solution.java diff --git a/10 Days of Statistics/Day 2 - Basic Probability/Solution.txt b/10 Days of Statistics/Day 2 - Basic Probability/Solution.txt new file mode 100644 index 0000000..2c9ff78 --- /dev/null +++ b/10 Days of Statistics/Day 2 - Basic Probability/Solution.txt @@ -0,0 +1,9 @@ +Answer: 5/6 + +There are 6 possibilities on each die. On 2 dice, there are 6 * 6 = 36 possibilities + +There are 6 cases where sum >= 10: (4,6), (5,6), (6,6), (5,5), (5,6), (6,6) + +This gives us probability(sum >= 10) = 6/36 = 1/6 + +That means probability(sum <= 9) = 1 - 1/6 = 5/6 diff --git a/10 Days of Statistics/Day 2 - Compound Event Probability/Solution.txt b/10 Days of Statistics/Day 2 - Compound Event Probability/Solution.txt new file mode 100644 index 0000000..2af0ce5 --- /dev/null +++ b/10 Days of Statistics/Day 2 - Compound Event Probability/Solution.txt @@ -0,0 +1,15 @@ +Answer: 17/42 + +Urn X has a 4/7 probability of giving a red ball +Urn Y has a 5/9 probability of giving a red ball +Urn Z has a 1/2 probability of giving a red ball + +Urn X has a 3/7 probability of giving a black ball +Urn Y has a 4/9 probability of giving a black ball +Urn Z has a 1/2 probability of giving a black ball + +P(2 red, 1 black) = P(Red Red Black) + P(Red Black Red) + P(Black Red Red) + = (4/7)(5/9)(1/2) + (4/7)(4/9)(1/2) + (3/7)(5/9)(1/2) + = 20/126 + 16/126 + 15/126 + = 51/126 + = 17/42 diff --git a/10 Days of Statistics/Day 2 - More Dice/Solution.txt b/10 Days of Statistics/Day 2 - More Dice/Solution.txt new file mode 100644 index 0000000..6bc52ba --- /dev/null +++ b/10 Days of Statistics/Day 2 - More Dice/Solution.txt @@ -0,0 +1,7 @@ +Answer: 1/9 + +There are 6 possibilities on each die. On 2 dice, there are 6 * 6 = 36 possibilities + +There are 4 cases that match the desired criteria: (1,5) (5,1) (2,4) (4,2) + +This gives us a probability of 4/36 = 1/9 diff --git a/10 Days of Statistics/Day 3 - Cards of the Same Suit/Solution.txt b/10 Days of Statistics/Day 3 - Cards of the Same Suit/Solution.txt new file mode 100644 index 0000000..c0eb283 --- /dev/null +++ b/10 Days of Statistics/Day 3 - Cards of the Same Suit/Solution.txt @@ -0,0 +1,5 @@ +Answer: 12/51 + +There are 13 of each suit in a deck. + +We can view this as 2 separate events. First we draw 1 card and see what suit it is. Whatever suit it is, there are 12 of the same matching suit remaining in the 51-card deck. Therefore, when we draw the 2nd card, there is a 12/51 chance that it is the same suit. diff --git a/10 Days of Statistics/Day 3 - Conditional Probability/Solution.txt b/10 Days of Statistics/Day 3 - Conditional Probability/Solution.txt new file mode 100644 index 0000000..c1e8ba6 --- /dev/null +++ b/10 Days of Statistics/Day 3 - Conditional Probability/Solution.txt @@ -0,0 +1,29 @@ +Answer: 1/3 + +****** 2 valid answers: 1/3 or 1/2 + +Reference: https://en.wikipedia.org/wiki/Boy_or_Girl_paradox + +This question is known as the "Boy or Girl Paradox". The actual answer is either 1/3 or 1/2 depending on how the question is interpreted. Here are 2 ways to interpret the question: + +1) From all families with two children, at least one of whom is a boy, a family is chosen at random. This would yield the answer of 1/3. +2) From all families with two children, one child is selected at random, and the sex of that child is specified to be a boy. This would yield an answer of 1/2. + + +******* Interpretation (1) gives an answer of 1/3 + +There are 4 possible scenarios: (B, B), (B, G), (G, B), (G, G) + +We know that 1 child is a boy, so now we have 3 scenarios: (B, B), (B, G), (G, B) + +When asked, "what is the probability that both children are boys", the only scenario that matches this is: (B, B). That is, only 1 of the 3 scenarios satisfies the critera, so there is a 1/3 chance that both children are boys. + + +******* Interpretation (2) gives an answer of 1/2 + +In this scenario, a child was selected at random from a set of all children that have exactly 1 sibling. Knowing the fact that the child is a boy does not give us any information on whether his sibling is a boy or a girl. + + +******* HackerRank's correct answer + +The accepted answer on HackerRank is 1/3. This aligns with the fact that the problem wording more closely resembles Interpretation (1). diff --git a/10 Days of Statistics/Day 3 - Drawing Marbles/Solution.txt b/10 Days of Statistics/Day 3 - Drawing Marbles/Solution.txt new file mode 100644 index 0000000..54fa3bd --- /dev/null +++ b/10 Days of Statistics/Day 3 - Drawing Marbles/Solution.txt @@ -0,0 +1,7 @@ +Answer: 2/3 + +After drawing the first marble, we are left with 2 red marbles and 4 blue marbles. Now we calculate the probability of drawing a blue marble as : + += (# of blue marbles) / (total # of marbles) += 4 / (2 + 4) += 2 / 3 diff --git a/10 Days of Statistics/Day 4 - Binomial Distribution I/Solution.java b/10 Days of Statistics/Day 4 - Binomial Distribution I/Solution.java new file mode 100644 index 0000000..20f03f1 --- /dev/null +++ b/10 Days of Statistics/Day 4 - Binomial Distribution I/Solution.java @@ -0,0 +1,41 @@ +public class Solution { + + public static void main(String[] args) { + double ratio = 1.09; + + double p = ratio / (1 + ratio); + int n = 6; + + /* Calculate result */ + double result = 0; + for (int x = 3; x <= n; x++) { + result += binomial(n, x, p); + } + System.out.format("%.3f", result); + } + + private static Double binomial(int n, int x, double p) { + if (p < 0 || p > 1 || n < 0 || x < 0 || x > n) { + return null; + } + return combinations(n, x) * Math.pow(p, x) * Math.pow(1 - p, n - x); + } + + private static Long combinations(int n, int x) { + if (n < 0 || x < 0 || x > n) { + return null; + } + return factorial(n) / (factorial(x) * factorial(n - x)); + } + + private static Long factorial (int n) { + if (n < 0) { + return null; + } + long result = 1; + while (n > 0) { + result *= n--; + } + return result; + } +} diff --git a/10 Days of Statistics/Day 4 - Binomial Distribution II/Solution.java b/10 Days of Statistics/Day 4 - Binomial Distribution II/Solution.java new file mode 100644 index 0000000..4433a74 --- /dev/null +++ b/10 Days of Statistics/Day 4 - Binomial Distribution II/Solution.java @@ -0,0 +1,44 @@ +public class Solution { + + public static void main(String[] args) { + /* Values given in problem statement */ + double p = 0.12; + int n = 10; + + /* "No more than 2 rejects" */ + double result = 0; + for (int x = 0; x <= 2; x++) { + result += binomial(n, x, p); + } + System.out.format("%.3f%n", result); + + /* "At least 2 rejects" */ + result = 1 - binomial(n, 0, p) - binomial(n, 1, p); + System.out.format("%.3f%n", result); + } + + private static Double binomial(int n, int x, double p) { + if (p < 0 || p > 1 || n < 0 || x < 0 || x > n) { + return null; + } + return combinations(n, x) * Math.pow(p, x) * Math.pow(1 - p, n - x); + } + + private static Long combinations(int n, int x) { + if (n < 0 || x < 0 || x > n) { + return null; + } + return factorial(n) / (factorial(x) * factorial(n - x)); + } + + private static Long factorial (int n) { + if (n < 0) { + return null; + } + long result = 1; + while (n > 0) { + result *= n--; + } + return result; + } +} diff --git a/10 Days of Statistics/Day 4 - Geometric Distribution I/Solution.java b/10 Days of Statistics/Day 4 - Geometric Distribution I/Solution.java new file mode 100644 index 0000000..fc82d04 --- /dev/null +++ b/10 Days of Statistics/Day 4 - Geometric Distribution I/Solution.java @@ -0,0 +1,39 @@ +import java.util.Scanner; + +public class Solution { + + public static void main(String[] args) { + /* Read and save input */ + Scanner scan = new Scanner(System.in); + int numerator = scan.nextInt(); + int denominator = scan.nextInt(); + int n = scan.nextInt(); + scan.close(); + + /* Geometric Series */ + double p = (double) numerator / denominator; + System.out.format("%.3f", geometric(n, p)); + } + + private static double geometric (int n, double p) { + return Math.pow(1 - p, n - 1) * p; + } + + private static Long combinations(int n, int x) { + if (n < 0 || x < 0 || x > n) { + return null; + } + return factorial(n) / (factorial(x) * factorial(n - x)); + } + + private static Long factorial (int n) { + if (n < 0) { + return null; + } + long result = 1; + while (n > 0) { + result *= n--; + } + return result; + } +} diff --git a/10 Days of Statistics/Day 4 - Geometric Distribution II/Solution.java b/10 Days of Statistics/Day 4 - Geometric Distribution II/Solution.java new file mode 100644 index 0000000..6f7ba1d --- /dev/null +++ b/10 Days of Statistics/Day 4 - Geometric Distribution II/Solution.java @@ -0,0 +1,43 @@ +import java.util.Scanner; + +public class Solution { + + public static void main(String[] args) { + /* Read and save input */ + Scanner scan = new Scanner(System.in); + int numerator = scan.nextInt(); + int denominator = scan.nextInt(); + int n = scan.nextInt(); + scan.close(); + + /* Geometric Series */ + double p = (double) numerator / denominator; + double result = 0; + for (int i = 1; i <= 5; i++) { + result += geometric(i, p); + } + System.out.format("%.3f", result); + } + + private static double geometric (int n, double p) { + return Math.pow(1 - p, n - 1) * p; + } + + private static Long combinations(int n, int x) { + if (n < 0 || x < 0 || x > n) { + return null; + } + return factorial(n) / (factorial(x) * factorial(n - x)); + } + + private static Long factorial (int n) { + if (n < 0) { + return null; + } + long result = 1; + while (n > 0) { + result *= n--; + } + return result; + } +} diff --git a/10 Days of Statistics/Day 5 - Normal Distribution I/Solution.java b/10 Days of Statistics/Day 5 - Normal Distribution I/Solution.java new file mode 100644 index 0000000..68093ef --- /dev/null +++ b/10 Days of Statistics/Day 5 - Normal Distribution I/Solution.java @@ -0,0 +1,37 @@ +public class Solution { + + public static void main(String[] args) { + double mean = 20; + double std = 2; + System.out.format("%.3f%n", cumulative(mean, std, 19.5)); + System.out.format("%.3f%n", cumulative(mean, std, 22) - cumulative(mean, std, 20)); + } + + /* Calculates cumulative probability */ + public static double cumulative(double mean, double std, double x) { + double parameter = (x - mean) / (std * Math.sqrt(2)); + return (0.5) * (1 + erf(parameter)); + } + + /* Source: http://introcs.cs.princeton.edu/java/21function/ErrorFunction.java.html */ + // fractional error in math formula less than 1.2 * 10 ^ -7. + // although subject to catastrophic cancellation when z in very close to 0 + // from Chebyshev fitting formula for erf(z) from Numerical Recipes, 6.2 + public static double erf(double z) { + double t = 1.0 / (1.0 + 0.5 * Math.abs(z)); + + // use Horner's method + double ans = 1 - t * Math.exp( -z*z - 1.26551223 + + t * ( 1.00002368 + + t * ( 0.37409196 + + t * ( 0.09678418 + + t * (-0.18628806 + + t * ( 0.27886807 + + t * (-1.13520398 + + t * ( 1.48851587 + + t * (-0.82215223 + + t * ( 0.17087277)))))))))); + if (z >= 0) return ans; + else return -ans; + } +} diff --git a/10 Days of Statistics/Day 5 - Normal Distribution II/Solution.java b/10 Days of Statistics/Day 5 - Normal Distribution II/Solution.java new file mode 100644 index 0000000..ecdb4dd --- /dev/null +++ b/10 Days of Statistics/Day 5 - Normal Distribution II/Solution.java @@ -0,0 +1,43 @@ +public class Solution { + + public static void main(String[] args) { + double mean = 70; + double std = 10; + + double result_1 = 100 * (1 - cumulative(mean, std, 80)); + double result_2 = 100 * (1 - cumulative(mean, std, 60)); + double result_3 = 100 * cumulative(mean, std, 60); + + System.out.format("%.2f%n", result_1); + System.out.format("%.2f%n", result_2); + System.out.format("%.2f%n", result_3); + } + + /* Calculates cumulative probability */ + public static double cumulative(double mean, double std, double x) { + double parameter = (x - mean) / (std * Math.sqrt(2)); + return (0.5) * (1 + erf(parameter)); + } + + /* Source: http://introcs.cs.princeton.edu/java/21function/ErrorFunction.java.html */ + // fractional error in math formula less than 1.2 * 10 ^ -7. + // although subject to catastrophic cancellation when z in very close to 0 + // from Chebyshev fitting formula for erf(z) from Numerical Recipes, 6.2 + public static double erf(double z) { + double t = 1.0 / (1.0 + 0.5 * Math.abs(z)); + + // use Horner's method + double ans = 1 - t * Math.exp( -z*z - 1.26551223 + + t * ( 1.00002368 + + t * ( 0.37409196 + + t * ( 0.09678418 + + t * (-0.18628806 + + t * ( 0.27886807 + + t * (-1.13520398 + + t * ( 1.48851587 + + t * (-0.82215223 + + t * ( 0.17087277)))))))))); + if (z >= 0) return ans; + else return -ans; + } +} diff --git a/10 Days of Statistics/Day 5 - Poisson Distribution I/Solution.java b/10 Days of Statistics/Day 5 - Poisson Distribution I/Solution.java new file mode 100644 index 0000000..297b58d --- /dev/null +++ b/10 Days of Statistics/Day 5 - Poisson Distribution I/Solution.java @@ -0,0 +1,29 @@ +import java.util.Scanner; + +public class Solution { + + public static void main(String[] args) { + /* Read and save input */ + Scanner scan = new Scanner(System.in); + double lambda = scan.nextDouble(); + int k = scan.nextInt(); + scan.close(); + + System.out.println(poisson(k, lambda)); + } + + private static double poisson(int k, double lambda) { + return (Math.pow(lambda, k) * Math.pow(Math.E, -1 * lambda)) / factorial(k); + } + + private static Long factorial (int n) { + if (n < 0) { + return null; + } + long result = 1; + while (n > 0) { + result *= n--; + } + return result; + } +} diff --git a/10 Days of Statistics/Day 5 - Poisson Distribution II/Solution.java b/10 Days of Statistics/Day 5 - Poisson Distribution II/Solution.java new file mode 100644 index 0000000..8d2fca8 --- /dev/null +++ b/10 Days of Statistics/Day 5 - Poisson Distribution II/Solution.java @@ -0,0 +1,24 @@ +import java.util.Scanner; + +/* Useful Formulas: + https://www.hackerrank.com/challenges/s10-poisson-distribution-2/forum/comments/175398 + https://www.hackerrank.com/challenges/s10-poisson-distribution-2/forum/comments/176962 +*/ +public class Solution { + + public static void main(String[] args) { + /* Read and save input */ + Scanner scan = new Scanner(System.in); + double A = scan.nextDouble(); + double B = scan.nextDouble(); + scan.close(); + + /* E[x^2] = lambda + lambda^2. Plug this into each formula */ + double dailyCostA = 160 + 40 * (A + (A * A)); + double dailyCostB = 128 + 40 * (B + (B * B)); + + /* Print output */ + System.out.format("%.3f%n", dailyCostA); + System.out.format("%.3f%n", dailyCostB); + } +} diff --git a/10 Days of Statistics/Day 6 - The Central Limit Theorem I/Solution.java b/10 Days of Statistics/Day 6 - The Central Limit Theorem I/Solution.java new file mode 100644 index 0000000..c1c39d4 --- /dev/null +++ b/10 Days of Statistics/Day 6 - The Central Limit Theorem I/Solution.java @@ -0,0 +1,49 @@ +/* This HackerRank problem has a buggy tutorial (formula is incorrect) and a buggy + solution (uses the incorrect formula) Hopefully they fix this issue soon. */ +public class Solution { + + public static void main(String[] args) { + double mean = 205; + double std = 15; + double maxWeight = 9800; + int n = 49; + + double samplesMean = mean * n; + + /* this INCORRECT formula (based off HackerRank tutorial) passes HackerRank tests */ + double samplesSTD = std * Math.sqrt(n); + + /* this is the correct formula (which currently wont pass HackerRank tests) */ + // double samplesSTD = std / Math.sqrt(n); + + System.out.format("%.4f", cumulative(samplesMean, samplesSTD, maxWeight)); + } + + /* Calculates cumulative probability */ + public static double cumulative(double mean, double std, double x) { + double parameter = (x - mean) / (std * Math.sqrt(2)); + return (0.5) * (1 + erf(parameter)); + } + + /* Source: http://introcs.cs.princeton.edu/java/21function/ErrorFunction.java.html */ + // fractional error in math formula less than 1.2 * 10 ^ -7. + // although subject to catastrophic cancellation when z in very close to 0 + // from Chebyshev fitting formula for erf(z) from Numerical Recipes, 6.2 + public static double erf(double z) { + double t = 1.0 / (1.0 + 0.5 * Math.abs(z)); + + // use Horner's method + double ans = 1 - t * Math.exp( -z*z - 1.26551223 + + t * ( 1.00002368 + + t * ( 0.37409196 + + t * ( 0.09678418 + + t * (-0.18628806 + + t * ( 0.27886807 + + t * (-1.13520398 + + t * ( 1.48851587 + + t * (-0.82215223 + + t * ( 0.17087277)))))))))); + if (z >= 0) return ans; + else return -ans; + } +} diff --git a/10 Days of Statistics/Day 6 - The Central Limit Theorem II/Solution.java b/10 Days of Statistics/Day 6 - The Central Limit Theorem II/Solution.java new file mode 100644 index 0000000..6bfb653 --- /dev/null +++ b/10 Days of Statistics/Day 6 - The Central Limit Theorem II/Solution.java @@ -0,0 +1,47 @@ +public class Solution { + + public static void main(String[] args) { + double ticketsLeft = 250; + int n = 100; + double mean = 2.4; + double std = 2; + + double samplesMean = mean * n; + + /* this INCORRECT formula (based off HackerRank tutorial) passes HackerRank tests */ + double samplesSTD = std * Math.sqrt(n); + + /* this is the correct formula (which currently wont pass HackerRank tests) */ + // double samplesSTD = std / Math.sqrt(n); + + System.out.format("%.4f", cumulative(samplesMean, samplesSTD, ticketsLeft)); + } + + /* Calculates cumulative probability */ + public static double cumulative(double mean, double std, double x) { + double parameter = (x - mean) / (std * Math.sqrt(2)); + return (0.5) * (1 + erf(parameter)); + } + + /* Source: http://introcs.cs.princeton.edu/java/21function/ErrorFunction.java.html */ + // fractional error in math formula less than 1.2 * 10 ^ -7. + // although subject to catastrophic cancellation when z in very close to 0 + // from Chebyshev fitting formula for erf(z) from Numerical Recipes, 6.2 + public static double erf(double z) { + double t = 1.0 / (1.0 + 0.5 * Math.abs(z)); + + // use Horner's method + double ans = 1 - t * Math.exp( -z*z - 1.26551223 + + t * ( 1.00002368 + + t * ( 0.37409196 + + t * ( 0.09678418 + + t * (-0.18628806 + + t * ( 0.27886807 + + t * (-1.13520398 + + t * ( 1.48851587 + + t * (-0.82215223 + + t * ( 0.17087277)))))))))); + if (z >= 0) return ans; + else return -ans; + } +} diff --git a/10 Days of Statistics/Day 6 - The Central Limit Theorem III/Solution.java b/10 Days of Statistics/Day 6 - The Central Limit Theorem III/Solution.java new file mode 100644 index 0000000..75e177c --- /dev/null +++ b/10 Days of Statistics/Day 6 - The Central Limit Theorem III/Solution.java @@ -0,0 +1,16 @@ +public class Solution { + public static void main(String[] args) { + /* Provided variables */ + double mean = 500; + double std = 80; + int n = 100; + double zScore = 1.96; // equivalent to 95% confidence interval + + /* Formula (found online) for confidence interval +/- */ + double marginOfError = zScore * std / Math.sqrt(n); + + /* Print output */ + System.out.format("%.2f%n", mean - marginOfError); + System.out.format("%.2f%n", mean + marginOfError); + } +} diff --git a/Tutorials/30 Days of Code/Day 0 - Hello, World/Solution.java b/30 Days of Code/Day 0 - Hello, World/Solution.java similarity index 100% rename from Tutorials/30 Days of Code/Day 0 - Hello, World/Solution.java rename to 30 Days of Code/Day 0 - Hello, World/Solution.java diff --git a/Tutorials/30 Days of Code/Day 1 - Data Types/Solution.java b/30 Days of Code/Day 1 - Data Types/Solution.java similarity index 100% rename from Tutorials/30 Days of Code/Day 1 - Data Types/Solution.java rename to 30 Days of Code/Day 1 - Data Types/Solution.java diff --git a/Tutorials/30 Days of Code/Day 2 - Operators/Solution.java b/30 Days of Code/Day 2 - Operators/Solution.java similarity index 100% rename from Tutorials/30 Days of Code/Day 2 - Operators/Solution.java rename to 30 Days of Code/Day 2 - Operators/Solution.java diff --git a/Tutorials/30 Days of Code/Day 3 - Intro to Conditional Statements/Solution.java b/30 Days of Code/Day 3 - Intro to Conditional Statements/Solution.java similarity index 100% rename from Tutorials/30 Days of Code/Day 3 - Intro to Conditional Statements/Solution.java rename to 30 Days of Code/Day 3 - Intro to Conditional Statements/Solution.java diff --git a/Tutorials/30 Days of Code/Day 4 - Class vs. Instance/Solution.java b/30 Days of Code/Day 4 - Class vs. Instance/Solution.java similarity index 100% rename from Tutorials/30 Days of Code/Day 4 - Class vs. Instance/Solution.java rename to 30 Days of Code/Day 4 - Class vs. Instance/Solution.java diff --git a/Tutorials/30 Days of Code/Day 5 - Loops/Solution.java b/30 Days of Code/Day 5 - Loops/Solution.java similarity index 100% rename from Tutorials/30 Days of Code/Day 5 - Loops/Solution.java rename to 30 Days of Code/Day 5 - Loops/Solution.java diff --git a/Tutorials/30 Days of Code/Day 6 - Let's Review/Solution.java b/30 Days of Code/Day 6 - Let's Review/Solution.java similarity index 100% rename from Tutorials/30 Days of Code/Day 6 - Let's Review/Solution.java rename to 30 Days of Code/Day 6 - Let's Review/Solution.java diff --git a/Tutorials/30 Days of Code/Day 7 - Arrays/Solution.java b/30 Days of Code/Day 7 - Arrays/Solution.java similarity index 100% rename from Tutorials/30 Days of Code/Day 7 - Arrays/Solution.java rename to 30 Days of Code/Day 7 - Arrays/Solution.java diff --git a/30 Days of Code/Day 8 - Dictionaries and Maps/Solution.java b/30 Days of Code/Day 8 - Dictionaries and Maps/Solution.java new file mode 100644 index 0000000..83c16c6 --- /dev/null +++ b/30 Days of Code/Day 8 - Dictionaries and Maps/Solution.java @@ -0,0 +1,28 @@ +import java.util.Scanner; +import java.util.HashMap; + +class Solution { + public static void main(String [] args) { + /* Read input and save as entries in a HashMap */ + Scanner scan = new Scanner(System.in); + int n = scan.nextInt(); + HashMap map = new HashMap<>(); + for(int i = 0; i < n; i++) { + String name = scan.next(); + int phone = scan.nextInt(); + map.put(name, phone); + } + + /* Read each query and check if its in our HashMap */ + while(scan.hasNext()) { + String s = scan.next(); + if (map.containsKey(s)) { + System.out.println(s + "=" + map.get(s)); + } else { + System.out.println("Not found"); + } + } + + scan.close(); + } +} diff --git a/30 Days of Code/Day 9 - Recursion/Solution.java b/30 Days of Code/Day 9 - Recursion/Solution.java new file mode 100644 index 0000000..24dbdaa --- /dev/null +++ b/30 Days of Code/Day 9 - Recursion/Solution.java @@ -0,0 +1,22 @@ +import java.util.Scanner; + +public class Solution { + + public static void main(String[] args) { + Scanner scan = new Scanner(System.in); + int n = scan.nextInt(); + System.out.println(factorial(n)); + scan.close(); + } + + private static Long factorial (int n) { + if (n < 0) { + return null; + } + long result = 1; + while (n > 0) { + result *= n--; + } + return result; + } +} diff --git a/Algorithms/Warmup/A Very Big Sum/Solution.java b/Algorithms/Warmup/A Very Big Sum/Solution.java new file mode 100644 index 0000000..1800695 --- /dev/null +++ b/Algorithms/Warmup/A Very Big Sum/Solution.java @@ -0,0 +1,13 @@ +import java.util.Scanner; + +public class Solution { + public static void main(String[] args) { + Scanner scan = new Scanner(System.in); + int size = scan.nextInt(); + long sum = 0; // use long to prevent integer overflow + for (int i = 0; i < size; i++) { + sum += scan.nextInt(); + } + System.out.println(sum); + } +} diff --git a/Algorithms/Warmup/Compare the Triplets/Solution.java b/Algorithms/Warmup/Compare the Triplets/Solution.java new file mode 100644 index 0000000..a0e4bc0 --- /dev/null +++ b/Algorithms/Warmup/Compare the Triplets/Solution.java @@ -0,0 +1,21 @@ +import java.util.Scanner; + +public class Solution { + + private int points = 0; + + public static void main(String[] args) { + Scanner scan = new Scanner(System.in); + int a0 = scan.nextInt(); + int a1 = scan.nextInt(); + int a2 = scan.nextInt(); + int b0 = scan.nextInt(); + int b1 = scan.nextInt(); + int b2 = scan.nextInt(); + + int aPoints = (a0 > b0 ? 1 : 0) + (a1 > b1 ? 1 : 0) + (a2 > b2 ? 1 : 0); + int bPoints = (a0 < b0 ? 1 : 0) + (a1 < b1 ? 1 : 0) + (a2 < b2 ? 1 : 0); + + System.out.println(aPoints + " " + bPoints); + } +} diff --git a/Algorithms/Warmup/Diagonal Difference/Solution.java b/Algorithms/Warmup/Diagonal Difference/Solution.java new file mode 100644 index 0000000..87b9b42 --- /dev/null +++ b/Algorithms/Warmup/Diagonal Difference/Solution.java @@ -0,0 +1,28 @@ +import java.util.Scanner; + +/* O(N^2) runtime. O(1) space */ +public class Solution { + public static void main(String[] args) { + Scanner scan = new Scanner(System.in); + int N = scan.nextInt(); + + int primaryDiagonal = 0; + int secondaryDiagonal = 0; + + for (int row = 0; row < N; row++) { + for (int col = 0; col < N; col++) { + int value = scan.nextInt(); + if (row == col) { + primaryDiagonal += value; + } + if (row + col == N - 1) { + secondaryDiagonal += value; + } + } + } + scan.close(); + + int absoluteDifference = Math.abs(primaryDiagonal - secondaryDiagonal); + System.out.println(absoluteDifference); + } +} diff --git a/Algorithms/Warmup/Plus Minus/Solution.java b/Algorithms/Warmup/Plus Minus/Solution.java new file mode 100644 index 0000000..357e1c1 --- /dev/null +++ b/Algorithms/Warmup/Plus Minus/Solution.java @@ -0,0 +1,31 @@ +import java.util.Scanner; + +/* O(n) runtime, O(1) space */ +public class Solution { + public static void main(String[] args) { + /* Get size */ + Scanner scan = new Scanner(System.in); + int size = scan.nextInt(); + + /* Count instances of +/-/0 */ + double positives = 0; + double negatives = 0; + double zeroes = 0; + for (int i = 0; i < size; i++) { + int value = scan.nextInt(); + if (value > 0) { + positives++; + } else if (value < 0) { + negatives++; + } else { + zeroes++; + } + } + scan.close(); + + /* Print ratios */ + System.out.println(positives / size); + System.out.println(negatives / size); + System.out.println(zeroes / size); + } +} diff --git a/Algorithms/Warmup/Simple Array Sum/Solution.java b/Algorithms/Warmup/Simple Array Sum/Solution.java new file mode 100644 index 0000000..a4c6cc0 --- /dev/null +++ b/Algorithms/Warmup/Simple Array Sum/Solution.java @@ -0,0 +1,13 @@ +import java.util.Scanner; + +public class Solution { + public static void main(String[] args) { + Scanner scan = new Scanner(System.in); + int size = scan.nextInt(); + int sum = 0; + for (int i = 0; i < size; i++) { + sum += scan.nextInt(); + } + System.out.println(sum); + } +} diff --git a/Algorithms/Warmup/Staircase/Solution.java b/Algorithms/Warmup/Staircase/Solution.java new file mode 100644 index 0000000..618e04e --- /dev/null +++ b/Algorithms/Warmup/Staircase/Solution.java @@ -0,0 +1,20 @@ +import java.util.Scanner; + +public class Solution { + public static void main(String[] args) { + /* Read and save input */ + Scanner scan = new Scanner(System.in); + int n = scan.nextInt(); + + /* Print staircase */ + for (int spaces = n - 1; spaces >= 0; spaces--) { + for (int i = 0; i < spaces; i++) { + System.out.print(" "); + } + for (int i = spaces; i < n; i++) { + System.out.print("#"); + } + System.out.println(); + } + } +} diff --git a/Tutorials/Cracking the Coding Interview/Algorithms/BFS - Shortest Reach in a Graph/Solution.java b/Cracking the Coding Interview/Algorithms/BFS - Shortest Reach in a Graph/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Algorithms/BFS - Shortest Reach in a Graph/Solution.java rename to Cracking the Coding Interview/Algorithms/BFS - Shortest Reach in a Graph/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Algorithms/Binary Search - Ice Cream Parlor/Solution.java b/Cracking the Coding Interview/Algorithms/Binary Search - Ice Cream Parlor/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Algorithms/Binary Search - Ice Cream Parlor/Solution.java rename to Cracking the Coding Interview/Algorithms/Binary Search - Ice Cream Parlor/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Algorithms/DFS - Connected Cell in a Grid/Solution.java b/Cracking the Coding Interview/Algorithms/DFS - Connected Cell in a Grid/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Algorithms/DFS - Connected Cell in a Grid/Solution.java rename to Cracking the Coding Interview/Algorithms/DFS - Connected Cell in a Grid/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Algorithms/Merge Sort - Counting Inversions/Solution.java b/Cracking the Coding Interview/Algorithms/Merge Sort - Counting Inversions/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Algorithms/Merge Sort - Counting Inversions/Solution.java rename to Cracking the Coding Interview/Algorithms/Merge Sort - Counting Inversions/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Algorithms/Sorting - Bubble Sort/Solution.java b/Cracking the Coding Interview/Algorithms/Sorting - Bubble Sort/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Algorithms/Sorting - Bubble Sort/Solution.java rename to Cracking the Coding Interview/Algorithms/Sorting - Bubble Sort/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Algorithms/Sorting - Comparator/Solution.java b/Cracking the Coding Interview/Algorithms/Sorting - Comparator/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Algorithms/Sorting - Comparator/Solution.java rename to Cracking the Coding Interview/Algorithms/Sorting - Comparator/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Data Structures/Arrays - Left Rotation/Solution.java b/Cracking the Coding Interview/Data Structures/Arrays - Left Rotation/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Data Structures/Arrays - Left Rotation/Solution.java rename to Cracking the Coding Interview/Data Structures/Arrays - Left Rotation/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Data Structures/Hash Tables - Ransom Note/Solution.java b/Cracking the Coding Interview/Data Structures/Hash Tables - Ransom Note/Solution.java similarity index 89% rename from Tutorials/Cracking the Coding Interview/Data Structures/Hash Tables - Ransom Note/Solution.java rename to Cracking the Coding Interview/Data Structures/Hash Tables - Ransom Note/Solution.java index 41f0504..418c470 100644 --- a/Tutorials/Cracking the Coding Interview/Data Structures/Hash Tables - Ransom Note/Solution.java +++ b/Cracking the Coding Interview/Data Structures/Hash Tables - Ransom Note/Solution.java @@ -18,7 +18,12 @@ public class Solution { } scan.close(); - canCreate(magazine, ransom); // attempt to create ransom letter + /* Attempt to create a ransom letter */ + if (magazine.length < ransom.length) { + System.out.println("No"); + } else { + canCreate(magazine, ransom); + } } /* Determines if ransom letter can be made from magazine */ diff --git a/Tutorials/Cracking the Coding Interview/Data Structures/Heaps - Find the Running Median/Solution.java b/Cracking the Coding Interview/Data Structures/Heaps - Find the Running Median/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Data Structures/Heaps - Find the Running Median/Solution.java rename to Cracking the Coding Interview/Data Structures/Heaps - Find the Running Median/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Data Structures/Linked Lists - Detect a Cycle/Solution.java b/Cracking the Coding Interview/Data Structures/Linked Lists - Detect a Cycle/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Data Structures/Linked Lists - Detect a Cycle/Solution.java rename to Cracking the Coding Interview/Data Structures/Linked Lists - Detect a Cycle/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Data Structures/Queue - A Tale of Two Stacks/Solution.java b/Cracking the Coding Interview/Data Structures/Queue - A Tale of Two Stacks/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Data Structures/Queue - A Tale of Two Stacks/Solution.java rename to Cracking the Coding Interview/Data Structures/Queue - A Tale of Two Stacks/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Data Structures/Stacks - Balanced Brackets/Solution.java b/Cracking the Coding Interview/Data Structures/Stacks - Balanced Brackets/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Data Structures/Stacks - Balanced Brackets/Solution.java rename to Cracking the Coding Interview/Data Structures/Stacks - Balanced Brackets/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Data Structures/Strings - Making Anagrams/Solution.java b/Cracking the Coding Interview/Data Structures/Strings - Making Anagrams/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Data Structures/Strings - Making Anagrams/Solution.java rename to Cracking the Coding Interview/Data Structures/Strings - Making Anagrams/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Data Structures/Trees - Is This a Binary Search Tree/Solution.java b/Cracking the Coding Interview/Data Structures/Trees - Is This a Binary Search Tree/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Data Structures/Trees - Is This a Binary Search Tree/Solution.java rename to Cracking the Coding Interview/Data Structures/Trees - Is This a Binary Search Tree/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Data Structures/Tries - Contacts/Solution.java b/Cracking the Coding Interview/Data Structures/Tries - Contacts/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Data Structures/Tries - Contacts/Solution.java rename to Cracking the Coding Interview/Data Structures/Tries - Contacts/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Techniques, Concepts/Bit Manipulation - Lonely Integer/Solution.java b/Cracking the Coding Interview/Techniques, Concepts/Bit Manipulation - Lonely Integer/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Techniques, Concepts/Bit Manipulation - Lonely Integer/Solution.java rename to Cracking the Coding Interview/Techniques, Concepts/Bit Manipulation - Lonely Integer/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Techniques, Concepts/DP - Coin Change/Solution.java b/Cracking the Coding Interview/Techniques, Concepts/DP - Coin Change/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Techniques, Concepts/DP - Coin Change/Solution.java rename to Cracking the Coding Interview/Techniques, Concepts/DP - Coin Change/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Techniques, Concepts/Recursion - Davis' Staircase/Solution.java b/Cracking the Coding Interview/Techniques, Concepts/Recursion - Davis' Staircase/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Techniques, Concepts/Recursion - Davis' Staircase/Solution.java rename to Cracking the Coding Interview/Techniques, Concepts/Recursion - Davis' Staircase/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Techniques, Concepts/Recursion - Fibonacci Numbers/Solution.java b/Cracking the Coding Interview/Techniques, Concepts/Recursion - Fibonacci Numbers/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Techniques, Concepts/Recursion - Fibonacci Numbers/Solution.java rename to Cracking the Coding Interview/Techniques, Concepts/Recursion - Fibonacci Numbers/Solution.java diff --git a/Tutorials/Cracking the Coding Interview/Techniques, Concepts/Time Complexity - Primality/Solution.java b/Cracking the Coding Interview/Techniques, Concepts/Time Complexity - Primality/Solution.java similarity index 100% rename from Tutorials/Cracking the Coding Interview/Techniques, Concepts/Time Complexity - Primality/Solution.java rename to Cracking the Coding Interview/Techniques, Concepts/Time Complexity - Primality/Solution.java diff --git a/README.md b/README.md index 63403c1..4d53564 100644 --- a/README.md +++ b/README.md @@ -30,59 +30,84 @@ My Java solutions to [HackerRank](https://www.hackerrank.com/) challenges | Java | Strings | [Java Regex 2 - Duplicate Words](https://www.hackerrank.com/challenges/duplicate-word) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Java/Strings/Java%20Regex%202%20-%20Duplicate%20Words/Solution.java) | -## Tutorials - 30 Days of Code +## 30 Days of Code -| Domain | Subdomain | Day | Challenge | Difficulty | Solution | -|:---------:|:---------------:|:---:|:--------------------------------------------------------------------------------------------------:|:------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| Tutorials | 30 Days of Code | 0 | [Hello, World](https://www.hackerrank.com/challenges/30-hello-world) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/30%20Days%20of%20Code/Day%200%20-%20Hello%2C%20World/Solution.java) | -| Tutorials | 30 Days of Code | 1 | [Data Types](https://www.hackerrank.com/challenges/30-data-types) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/30%20Days%20of%20Code/Day%201%20-%20Data%20Types/Solution.java) | -| Tutorials | 30 Days of Code | 2 | [Operators](https://www.hackerrank.com/challenges/30-operators) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/30%20Days%20of%20Code/Day%202%20-%20Operators/Solution.java) | -| Tutorials | 30 Days of Code | 3 | [Intro to Conditional Statements](https://www.hackerrank.com/challenges/30-conditional-statements) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/30%20Days%20of%20Code/Day%203%20-%20Intro%20to%20Conditional%20Statements/Solution.java) | -| Tutorials | 30 Days of Code | 4 | [Class vs. Instance](https://www.hackerrank.com/challenges/30-class-vs-instance) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/30%20Days%20of%20Code/Day%204%20-%20Class%20vs.%20Instance/Solution.java) | -| Tutorials | 30 Days of Code | 5 | [Loops](https://www.hackerrank.com/challenges/30-loops) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/30%20Days%20of%20Code/Day%205%20-%20Loops/Solution.java) | -| Tutorials | 30 Days of Code | 6 | [Let's Review](https://www.hackerrank.com/challenges/30-review-loop) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/30%20Days%20of%20Code/Day%206%20-%20Let's%20Review/Solution.java) | -| Tutorials | 30 Days of Code | 7 | [Arrays](https://www.hackerrank.com/challenges/30-arrays) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/30%20Days%20of%20Code/Day%207%20-%20Arrays/Solution.java) | +| Domain | Subdomain | Day | Challenge | Difficulty | Solution | +|:---------:|:---------------:|:---:|:--------------------------------------------------------------------------------------------------:|:------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| Tutorials | 30 Days of Code | 0 | [Hello, World](https://www.hackerrank.com/challenges/30-hello-world) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/30%20Days%20of%20Code/Day%200%20-%20Hello%2C%20World/Solution.java) | +| Tutorials | 30 Days of Code | 1 | [Data Types](https://www.hackerrank.com/challenges/30-data-types) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/30%20Days%20of%20Code/Day%201%20-%20Data%20Types/Solution.java) | +| Tutorials | 30 Days of Code | 2 | [Operators](https://www.hackerrank.com/challenges/30-operators) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/30%20Days%20of%20Code/Day%202%20-%20Operators/Solution.java) | +| Tutorials | 30 Days of Code | 3 | [Intro to Conditional Statements](https://www.hackerrank.com/challenges/30-conditional-statements) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/30%20Days%20of%20Code/Day%203%20-%20Intro%20to%20Conditional%20Statements/Solution.java) | +| Tutorials | 30 Days of Code | 4 | [Class vs. Instance](https://www.hackerrank.com/challenges/30-class-vs-instance) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/30%20Days%20of%20Code/Day%204%20-%20Class%20vs.%20Instance/Solution.java) | +| Tutorials | 30 Days of Code | 5 | [Loops](https://www.hackerrank.com/challenges/30-loops) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/30%20Days%20of%20Code/Day%205%20-%20Loops/Solution.java) | +| Tutorials | 30 Days of Code | 6 | [Let's Review](https://www.hackerrank.com/challenges/30-review-loop) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/30%20Days%20of%20Code/Day%206%20-%20Let's%20Review/Solution.java) | +| Tutorials | 30 Days of Code | 7 | [Arrays](https://www.hackerrank.com/challenges/30-arrays) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/30%20Days%20of%20Code/Day%207%20-%20Arrays/Solution.java) | +| Tutorials | 30 Days of Code | 8 | [Dictionaries and Maps](https://www.hackerrank.com/challenges/30-dictionaries-and-maps) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/30%20Days%20of%20Code/Day%208%20-%20Dictionaries%20and%20Maps/Solution.java) | +| Tutorials | 30 Days of Code | 9 | [Recursion](https://www.hackerrank.com/challenges/30-recursion) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/30%20Days%20of%20Code/Day%209%20-%20Recursion/Solution.java) | -## Tutorials - Cracking the Coding Interview +## Cracking the Coding Interview -| Domain | Subdomain | Topic | Challenge | Difficulty | Solution | -|:---------:|:-----------------------------:|:---------------------:|:--------------------------------------------------------------------------------------------------------:|:----------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| Tutorials | Cracking the Coding Interview | Data Structures | [Arrays: Left Rotation](https://www.hackerrank.com/challenges/ctci-array-left-rotation) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Data%20Structures/Arrays%20-%20Left%20Rotation/Solution.java) | -| Tutorials | Cracking the Coding Interview | Data Structures | [Strings: Making Anagrams](https://www.hackerrank.com/challenges/ctci-making-anagrams) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Data%20Structures/Strings%20-%20Making%20Anagrams/Solution.java) | -| Tutorials | Cracking the Coding Interview | Data Structures | [Hash Tables: Ransom Note](https://www.hackerrank.com/challenges/ctci-ransom-note) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Data%20Structures/Hash%20Tables%20-%20Ransom%20Note/Solution.java) | -| Tutorials | Cracking the Coding Interview | Data Structures | [Linked Lists: Detect a Cycle](https://www.hackerrank.com/challenges/ctci-linked-list-cycle) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Data%20Structures/Linked%20Lists%20-%20Detect%20a%20Cycle/Solution.java) | -| Tutorials | Cracking the Coding Interview | Data Structures | [Stacks: Balanced Brackets](https://www.hackerrank.com/challenges/ctci-balanced-brackets) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Data%20Structures/Stacks%20-%20Balanced%20Brackets/Solution.java) | -| Tutorials | Cracking the Coding Interview | Data Structures | [Queues: A Tale of Two Stacks](https://www.hackerrank.com/challenges/ctci-queue-using-two-stacks) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Data%20Structures/Queue%20-%20A%20Tale%20of%20Two%20Stacks/Solution.java) | -| Tutorials | Cracking the Coding Interview | Data Structures | [Trees: Is This a Binary Search Tree?](https://www.hackerrank.com/challenges/ctci-is-binary-search-tree) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Data%20Structures/Trees%20-%20Is%20This%20a%20Binary%20Search%20Tree/Solution.java) | -| Tutorials | Cracking the Coding Interview | Data Structures | [Heaps: Find the Running Median](https://www.hackerrank.com/challenges/ctci-find-the-running-median) | Hard | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Data%20Structures/Heaps%20-%20Find%20the%20Running%20Median/Solution.java) | -| Tutorials | Cracking the Coding Interview | Data Structures | [Tries: Contacts](https://www.hackerrank.com/challenges/ctci-contacts) | Hard | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Data%20Structures/Tries%20-%20Contacts/Solution.java) | -| Tutorials | Cracking the Coding Interview | Algorithms | [Sorting: Bubble Sort](https://www.hackerrank.com/challenges/ctci-bubble-sort) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Algorithms/Sorting%20-%20Bubble%20Sort/Solution.java) | -| Tutorials | Cracking the Coding Interview | Algorithms | [Sorting: Comparator](https://www.hackerrank.com/challenges/ctci-comparator-sorting) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Algorithms/Sorting%20-%20Comparator/Solution.java) | -| Tutorials | Cracking the Coding Interview | Algorithms | [Merge Sort: Counting Inversions](https://www.hackerrank.com/challenges/ctci-merge-sort) | Hard | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Algorithms/Merge%20Sort%20-%20Counting%20Inversions/Solution.java) | -| Tutorials | Cracking the Coding Interview | Algorithms | [Binary Search: Ice Cream Parlor](https://www.hackerrank.com/challenges/ctci-ice-cream-parlor) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Algorithms/Binary%20Search%20-%20Ice%20Cream%20Parlor/Solution.java) | -| Tutorials | Cracking the Coding Interview | Algorithms | [DFS: Connected Cell in a Grid](https://www.hackerrank.com/challenges/ctci-connected-cell-in-a-grid) | Hard | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Algorithms/DFS%20-%20Connected%20Cell%20in%20a%20Grid/Solution.java) | -| Tutorials | Cracking the Coding Interview | Algorithms | [BFS: Shortest Reach in a Graph](https://www.hackerrank.com/challenges/ctci-bfs-shortest-reach) | Hard | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Algorithms/BFS%20-%20Shortest%20Reach%20in%20a%20Graph/Solution.java) | -| Tutorials | Cracking the Coding Interview | Techniques / Concepts | [Time Complexity: Primality](https://www.hackerrank.com/challenges/ctci-big-o) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Techniques%2C%20Concepts/Time%20Complexity%20-%20Primality/Solution.java) | -| Tutorials | Cracking the Coding Interview | Techniques / Concepts | [Recrusion: Fibonacci Numbers](https://www.hackerrank.com/challenges/ctci-fibonacci-numbers) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Techniques%2C%20Concepts/Recursion%20-%20Fibonacci%20Numbers/Solution.java) | -| Tutorials | Cracking the Coding Interview | Techniques / Concepts | [Recursion: Davis' Staircase](https://www.hackerrank.com/challenges/ctci-recursive-staircase) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Techniques%2C%20Concepts/Recursion%20-%20Davis'%20Staircase/Solution.java) | -| Tutorials | Cracking the Coding Interview | Techniques / Concepts | [DP: Coin Change](https://www.hackerrank.com/challenges/ctci-coin-change) | Hard | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Techniques%2C%20Concepts/DP%20-%20Coin%20Change/Solution.java) | -| Tutorials | Cracking the Coding Interview | Techniques / Concepts | [Bit Manipulation: Lonely Integer](https://www.hackerrank.com/challenges/ctci-lonely-integer) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/Cracking%20the%20Coding%20Interview/Techniques%2C%20Concepts/Bit%20Manipulation%20-%20Lonely%20Integer/Solution.java) | +| Domain | Subdomain | Topic | Challenge | Difficulty | Solution | +|:---------:|:-----------------------------:|:---------------------:|:--------------------------------------------------------------------------------------------------------:|:----------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| Tutorials | Cracking the Coding Interview | Data Structures | [Arrays: Left Rotation](https://www.hackerrank.com/challenges/ctci-array-left-rotation) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Data%20Structures/Arrays%20-%20Left%20Rotation/Solution.java) | +| Tutorials | Cracking the Coding Interview | Data Structures | [Strings: Making Anagrams](https://www.hackerrank.com/challenges/ctci-making-anagrams) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Data%20Structures/Strings%20-%20Making%20Anagrams/Solution.java) | +| Tutorials | Cracking the Coding Interview | Data Structures | [Hash Tables: Ransom Note](https://www.hackerrank.com/challenges/ctci-ransom-note) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Data%20Structures/Hash%20Tables%20-%20Ransom%20Note/Solution.java) | +| Tutorials | Cracking the Coding Interview | Data Structures | [Linked Lists: Detect a Cycle](https://www.hackerrank.com/challenges/ctci-linked-list-cycle) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Data%20Structures/Linked%20Lists%20-%20Detect%20a%20Cycle/Solution.java) | +| Tutorials | Cracking the Coding Interview | Data Structures | [Stacks: Balanced Brackets](https://www.hackerrank.com/challenges/ctci-balanced-brackets) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Data%20Structures/Stacks%20-%20Balanced%20Brackets/Solution.java) | +| Tutorials | Cracking the Coding Interview | Data Structures | [Queues: A Tale of Two Stacks](https://www.hackerrank.com/challenges/ctci-queue-using-two-stacks) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Data%20Structures/Queue%20-%20A%20Tale%20of%20Two%20Stacks/Solution.java) | +| Tutorials | Cracking the Coding Interview | Data Structures | [Trees: Is This a Binary Search Tree?](https://www.hackerrank.com/challenges/ctci-is-binary-search-tree) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Data%20Structures/Trees%20-%20Is%20This%20a%20Binary%20Search%20Tree/Solution.java) | +| Tutorials | Cracking the Coding Interview | Data Structures | [Heaps: Find the Running Median](https://www.hackerrank.com/challenges/ctci-find-the-running-median) | Hard | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Data%20Structures/Heaps%20-%20Find%20the%20Running%20Median/Solution.java) | +| Tutorials | Cracking the Coding Interview | Data Structures | [Tries: Contacts](https://www.hackerrank.com/challenges/ctci-contacts) | Hard | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Data%20Structures/Tries%20-%20Contacts/Solution.java) | +| Tutorials | Cracking the Coding Interview | Algorithms | [Sorting: Bubble Sort](https://www.hackerrank.com/challenges/ctci-bubble-sort) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Algorithms/Sorting%20-%20Bubble%20Sort/Solution.java) | +| Tutorials | Cracking the Coding Interview | Algorithms | [Sorting: Comparator](https://www.hackerrank.com/challenges/ctci-comparator-sorting) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Algorithms/Sorting%20-%20Comparator/Solution.java) | +| Tutorials | Cracking the Coding Interview | Algorithms | [Merge Sort: Counting Inversions](https://www.hackerrank.com/challenges/ctci-merge-sort) | Hard | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Algorithms/Merge%20Sort%20-%20Counting%20Inversions/Solution.java) | +| Tutorials | Cracking the Coding Interview | Algorithms | [Binary Search: Ice Cream Parlor](https://www.hackerrank.com/challenges/ctci-ice-cream-parlor) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Algorithms/Binary%20Search%20-%20Ice%20Cream%20Parlor/Solution.java) | +| Tutorials | Cracking the Coding Interview | Algorithms | [DFS: Connected Cell in a Grid](https://www.hackerrank.com/challenges/ctci-connected-cell-in-a-grid) | Hard | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Algorithms/DFS%20-%20Connected%20Cell%20in%20a%20Grid/Solution.java) | +| Tutorials | Cracking the Coding Interview | Algorithms | [BFS: Shortest Reach in a Graph](https://www.hackerrank.com/challenges/ctci-bfs-shortest-reach) | Hard | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Algorithms/BFS%20-%20Shortest%20Reach%20in%20a%20Graph/Solution.java) | +| Tutorials | Cracking the Coding Interview | Techniques / Concepts | [Time Complexity: Primality](https://www.hackerrank.com/challenges/ctci-big-o) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Techniques%2C%20Concepts/Time%20Complexity%20-%20Primality/Solution.java) | +| Tutorials | Cracking the Coding Interview | Techniques / Concepts | [Recrusion: Fibonacci Numbers](https://www.hackerrank.com/challenges/ctci-fibonacci-numbers) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Techniques%2C%20Concepts/Recursion%20-%20Fibonacci%20Numbers/Solution.java) | +| Tutorials | Cracking the Coding Interview | Techniques / Concepts | [Recursion: Davis' Staircase](https://www.hackerrank.com/challenges/ctci-recursive-staircase) | Medium | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Techniques%2C%20Concepts/Recursion%20-%20Davis'%20Staircase/Solution.java) | +| Tutorials | Cracking the Coding Interview | Techniques / Concepts | [DP: Coin Change](https://www.hackerrank.com/challenges/ctci-coin-change) | Hard | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Techniques%2C%20Concepts/DP%20-%20Coin%20Change/Solution.java) | +| Tutorials | Cracking the Coding Interview | Techniques / Concepts | [Bit Manipulation: Lonely Integer](https://www.hackerrank.com/challenges/ctci-lonely-integer) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Cracking%20the%20Coding%20Interview/Techniques%2C%20Concepts/Bit%20Manipulation%20-%20Lonely%20Integer/Solution.java) | -## Tutorials - 10 Days of Statistics +## 10 Days of Statistics -| Domain | Subdomain | Day | Challenge | Difficulty | Solution | -|:---------:|:---------------------:|:---:|:------------------------------------------------------------------------------------:|:------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| Tutorials | 10 Days of Statistics | 0 | [Mean, Median, and Mode](https://www.hackerrank.com/challenges/s10-basic-statistics) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/10%20Days%20of%20Statistics/Day%200%20-%20Mean%2C%20Median%2C%20and%20Mode/Solution.java) | -| Tutorials | 10 Days of Statistics | 0 | [Weighted Mean](https://www.hackerrank.com/challenges/s10-weighted-mean) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/10%20Days%20of%20Statistics/Day%200%20-%20Weighted%20Mean/Solution.java) | -| Tutorials | 10 Days of Statistics | 1 | [Quartiles](https://www.hackerrank.com/challenges/s10-quartiles) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/10%20Days%20of%20Statistics/Day%201%20-%20Quartiles/Solution.java) | -| Tutorials | 10 Days of Statistics | 1 | [Interquartile Range](https://www.hackerrank.com/challenges/s10-interquartile-range) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/10%20Days%20of%20Statistics/Day%201%20-%20Interquartile%20Range/Solution.java) | -| Tutorials | 10 Days of Statistics | 1 | [Standard Deviation](https://www.hackerrank.com/challenges/s10-standard-deviation) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Tutorials/10%20Days%20of%20Statistics/Day%201%20-%20Standard%20Deviation/Solution.java) | +| Domain | Subdomain | Day | Challenge | Difficulty | Solution | +|:---------:|:---------------------:|:---:|:--------------------------------------------------------------------------------------------------------------------------:|:---------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| Tutorials | 10 Days of Statistics | 0 | [Mean, Median, and Mode](https://www.hackerrank.com/challenges/s10-basic-statistics) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%200%20-%20Mean%2C%20Median%2C%20and%20Mode/Solution.java) | +| Tutorials | 10 Days of Statistics | 0 | [Weighted Mean](https://www.hackerrank.com/challenges/s10-weighted-mean) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%200%20-%20Weighted%20Mean/Solution.java) | +| Tutorials | 10 Days of Statistics | 1 | [Quartiles](https://www.hackerrank.com/challenges/s10-quartiles) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%201%20-%20Quartiles/Solution.java) | +| Tutorials | 10 Days of Statistics | 1 | [Interquartile Range](https://www.hackerrank.com/challenges/s10-interquartile-range) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%201%20-%20Interquartile%20Range/Solution.java) | +| Tutorials | 10 Days of Statistics | 1 | [Standard Deviation](https://www.hackerrank.com/challenges/s10-standard-deviation) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%201%20-%20Standard%20Deviation/Solution.java) | +| Tutorials | 10 Days of Statistics | 2 | [Basic Probability](https://www.hackerrank.com/challenges/s10-mcq-1) | Multiple Choice | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%202%20-%20Basic%20Probability/Solution.txt) | +| Tutorials | 10 Days of Statistics | 2 | [More Dice](https://www.hackerrank.com/challenges/s10-mcq-2) | Multiple Choice | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%202%20-%20More%20Dice/Solution.txt) | +| Tutorials | 10 Days of Statistics | 2 | [Compound Event Probability](https://www.hackerrank.com/challenges/s10-mcq-3) | Multiple Choice | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%202%20-%20Compound%20Event%20Probability/Solution.txt) | +| Tutorials | 10 Days of Statistics | 3 | [Conditional Probability](https://www.hackerrank.com/challenges/s10-mcq-4) | Multiple Choice | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%203%20-%20Conditional%20Probability/Solution.txt) | +| Tutorials | 10 Days of Statistics | 3 | [Cards of the Same Suit](https://www.hackerrank.com/challenges/s10-mcq-5) | Multiple Choice | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%203%20-%20Cards%20of%20the%20Same%20Suit/Solution.txt) | +| Tutorials | 10 Days of Statistics | 3 | [Drawing Marbles](https://www.hackerrank.com/challenges/s10-mcq-6) | Multiple Choice | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%203%20-%20Drawing%20Marbles/Solution.txt) | +| Tutorials | 10 Days of Statistics | 4 | [Binomial Distribution I](https://www.hackerrank.com/challenges/s10-binomial-distribution-1) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%204%20-%20Binomial%20Distribution%20I/Solution.java) | +| Tutorials | 10 Days of Statistics | 4 | [Binomial Distribution II](https://www.hackerrank.com/challenges/s10-binomial-distribution-2) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%204%20-%20Binomial%20Distribution%20II/Solution.java) | +| Tutorials | 10 Days of Statistics | 4 | [Geometric Distribution I](https://www.hackerrank.com/challenges/s10-geometric-distribution-1) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%204%20-%20Geometric%20Distribution%20I/Solution.java) | +| Tutorials | 10 Days of Statistics | 4 | [Geometric Distribution II](https://www.hackerrank.com/challenges/s10-geometric-distribution-2) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%204%20-%20Geometric%20Distribution%20II/Solution.java) | +| Tutorials | 10 Days of Statistics | 5 | [Poisson Distribution I](https://www.hackerrank.com/challenges/s10-poisson-distribution-1) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%205%20-%20Poisson%20Distribution%20I/Solution.java) | +| Tutorials | 10 Days of Statistics | 5 | [Poisson Distribution II](https://www.hackerrank.com/challenges/s10-poisson-distribution-2) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%205%20-%20Poisson%20Distribution%20II/Solution.java) | +| Tutorials | 10 Days of Statistics | 5 | [Normal Distribution I](https://www.hackerrank.com/challenges/s10-normal-distribution-1) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%205%20-%20Normal%20Distribution%20I/Solution.java) | +| Tutorials | 10 Days of Statistics | 5 | [Normal Distribution II](https://www.hackerrank.com/challenges/s10-normal-distribution-2) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%205%20-%20Normal%20Distribution%20II/Solution.java) | +| Tutorials | 10 Days of Statistics | 6 | [The Central Limit Theorem I](https://www.hackerrank.com/challenges/s10-the-central-limit-theorem-1) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%206%20-%20The%20Central%20Limit%20Theorem%20I/Solution.java) | +| Tutorials | 10 Days of Statistics | 6 | [The Central Limit Theorem II](https://www.hackerrank.com/challenges/s10-the-central-limit-theorem-2) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%206%20-%20The%20Central%20Limit%20Theorem%20II/Solution.java) | +| Tutorials | 10 Days of Statistics | 6 | [The Central Limit Theorem III](https://www.hackerrank.com/challenges/s10-the-central-limit-theorem-3) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/10%20Days%20of%20Statistics/Day%206%20-%20The%20Central%20Limit%20Theorem%20III/Solution.java) | ## Algorithms -| Domain | Subdomain | Challenge | Difficulty | Solution | -|:----------:|:---------:|:----------------------------------------------------------------------:|:----------:|:------------------------------------------------------------------------------------------------------------------------------------:| -| Algorithms | Warmup | [Solve Me First](https://www.hackerrank.com/challenges/solve-me-first) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Algorithms/Warmup/Solve%20Me%20First/Solution.java) | +| Domain | Subdomain | Challenge | Difficulty | Solution | +|:----------:|:---------:|:----------------------------------------------------------------------------------:|:----------:|:------------------------------------------------------------------------------------------------------------------------------------------:| +| Algorithms | Warmup | [Solve Me First](https://www.hackerrank.com/challenges/solve-me-first) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Algorithms/Warmup/Solve%20Me%20First/Solution.java) | +| Algorithms | Warmup | [Simple Array Sum](https://www.hackerrank.com/challenges/simple-array-sum) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Algorithms/Warmup/Simple%20Array%20Sum/Solution.java) | +| Algorithms | Warmup | [Compare the Triplets](https://www.hackerrank.com/challenges/compare-the-triplets) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Algorithms/Warmup/Compare%20the%20Triplets/Solution.java) | +| Algorithms | Warmup | [A Very Big Sum](https://www.hackerrank.com/challenges/a-very-big-sum) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Algorithms/Warmup/A%20Very%20Big%20Sum/Solution.java) | +| Algorithms | Warmup | [Diagonal Difference](https://www.hackerrank.com/challenges/diagonal-difference) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Algorithms/Warmup/Diagonal%20Difference/Solution.java) | +| Algorithms | Warmup | [Plus Minus](https://www.hackerrank.com/challenges/plus-minus) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Algorithms/Warmup/Plus%20Minus/Solution.java) | +| Algorithms | Warmup | [Staircase](https://www.hackerrank.com/challenges/staircase) | Easy | [Solution.java](https://github.com/rshaghoulian/HackerRank-solutions/blob/master/Algorithms/Warmup/Staircase/Solution.java) |