☕ /hackerrank-java 🐍 /hackerrank-python 👨💻 /hackerrank-data-structures 🐱💻 /hackerrank-algorithms 🧰 /hackerrank-interview-preparation-kit

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function W = pixelate(I, w) | |
[n, m, ~] = size(I); | |
W = I; | |
for row = w + 1 : 2 * w + 1 : n + w | |
for column = w + 1 : 2 * w + 1 : m + w | |
row_upper = upper(row + w, n, n); | |
column_upper = upper(column + w, m, m); | |
sub_image = I(row - w : row_upper, column - w : column_upper, :); | |
average = mean(mean(sub_image)); |
/hackerrank-java-basic-skill-test /hackerrank-python-basic-skill-test /hackerrank-problem-solving-skill-test /hackerrank-js-basic-skill-test /hackerrank-problem-solving-intermediate-skill-test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is the binary search algorithm that returns the position at which an | |
element is found or the position it should be inserted at if the element is not present. | |
In other words this algorithm returns position (non conforming in case of duplicates) or the position | |
of largest element than the one we were searching for if position not found. | |
*/ | |
class BinarySearch { | |
private static int search(int[] array, int val) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"future": "adds sunglasses to all zombies", | |
"mustache": "adds mustache to all zombies" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class StringBuilderExample { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
StringBuilder builder = new StringBuilder(scanner.nextLine()); | |
builder.append(" hello world"); | |
System.out.println(builder.toString()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl |
OlderNewer