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] [SQL] Basic Select – Japanese Cities’ Name

Query the the names of all the Japanese cities in CITY. The COUNTRYCODE for Japan is JPN. Input Format The CITY table is described as follows: Solution

Note: Solusi-solusi dari challenge yang diberikan HackerRank murni berasal dari penulis sendiri.   Pada challenge di atas, kita diminta untuk membuat query untuk menampilkan nama dari semua kota-kota […]

Read More

[HackerRank Solutions] [SQL] Basic Select – Weather Observation Station 3

Query a list of CITY names from STATION with even ID numbers only. You may print the results in any order, but must exclude duplicates from your answer. Input Format The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. Solution

Note: Solusi-solusi dari challenge […]

Read More

[HackerRank Solutions] [SQL] Basic Select – Weather Observation Station 1

Query a list of CITY and STATE from STATION. Input Format The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. Solution

Note: Solusi-solusi dari challenge yang diberikan HackerRank murni berasal dari penulis sendiri.   Pada challenge di atas, kita diminta untuk membuat query untuk menampilkan […]

Read More