Mudahnya Menggunakan Git di Android Studio [Part 1]

Git adalah salah satu version control system (VCS) untuk mencatat setiap perubahan yang terjadi pada suatu file. Git biasa digunakan oleh programmer, terutama jika project dikerjakan secara bersama-sama. Di Android Studio sendiri, telah tersedia plugin Git sehingga untuk melakukan perintahnya, tidak perlu menghapal command-command-nya. 😀 Oke langsung aja, pertama-tama, install dulu git-nya di komputer Anda. Download Git. Kemudian lakukan […]

Read More

[HackerRank Solutions] [Java] Introduction – Java Loops

Problem Statement In this problem you will test your knowledge of Java loops. Given three integers a, b, and n, output the following series: Input Format The first line will contain the number of testcases t. Each of the next t lines will have three integers, a, b, and n. Constraints: Output Format Print the […]

Read More

[HackerRank Solutions] [Algorithms] Warmup – Diagonal Difference

Problem Statement Given a square matrix of size N x N, calculate the absolute difference between the sums of its diagonals. Input Format The first line contains a single integer, N. The next N lines denote the matrix’s rows, with each line containing N space-separated integers describing the columns. Output Format Print the absolute difference between […]

Read More

[HackerRank Solutions] [Java] Introduction – Java Stdin and Stdout 2

Problem Statement Most of the problems on HackerRank require reading input from stdin (standard input) and writing output to stdout (standard output). One way to read from stdin is by using the Scanner class and specifying the InputStream as System.in. Alternatively, you can use the BufferedReader class. Lines of output can be written to stdout […]

Read More

[HackerRank Solutions] [Java] Introduction – Java If-Else

Problem Statement Using “if-else” you can perform decision making in Java. See the flowchart below (taken from wikipedia): This problem will test your knowledge on “if-else” statements. Given an integer N as input, check the following: If N is odd, print “Weird”. If N is even and, in between the range of 2 and 5(inclusive), […]

Read More

[HackerRank Solutions] [Java] Introduction – Java Stdin and Stdout 1

Problem Statement In most of the HackerRank challenges, you need to read input from stdin (standard input) and write your output in stdout (standard output). One way to take input from stdin is to use the Scanner class and read in from System.in. You can write your output to stdout by simply using the System.out.println(String) […]

Read More

[HackerRank Solutions] [Java] Introduction – Welcome to Java!

Problem Statement Welcome to the world of Java! Just print “Hello World.” and “Hello Java.” in two separate lines to complete this challenge. The code stub in the editor already creates the main function and solution class. All you have to do is copy and paste the following lines inside the main function.

Sample […]

Read More

[HackerRank Solutions] [Algorithms] Warmup – A Very Big Sum

Problem Statement You are given an array of integers of size N. You need to print the sum of the elements in the array, keeping in mind that some of those integers may be quite large. Input The first line of the input consists of an integer N. The next line contains N space-separated integers […]

Read More

[HackerRank Solutions] [Algorithms] Warmup – Simple Array Sum

Problem Statement You are given an array of integers of size N. Can you find the sum of the elements in the array? Input The first line of input consists of an integer N. The next line contains N space-separated integers representing the array elements. Sample: 6 1 2 3 4 10 11 Output Output […]

Read More

[HackerRank Solutions] [Algorithms] Warmup – Solve Me First

HackerRank adalah situs yang dikhususkan untuk programmer atau siapapun yang ingin meningkatkan kemampuannya dalam memecahkan masalah yang diberikan. Melalui HackerRank, kita dapat mengukur kemampuan berlogika, pemahaman algoritma dan pemrograman kita dengan mengikuti challenge atau contest yang diadakan. Penulis sendiri baru beberapa hari gabung dan mengikuti beberapa challenge yang ada. Selanjutnya, penulis ingin berbagi solusi dari challenge yang […]

Read More