[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] [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