Skip to content

Instantly share code, notes, and snippets.

View kholub1989's full-sized avatar
🎯
First, solve the problem. Then, write the code.

Krisztian Holub kholub1989

🎯
First, solve the problem. Then, write the code.
View GitHub Profile
@lasverg
lasverg / diagonal-difference.js
Last active May 29, 2023 06:34
Diagonal Difference | Solution | JavaScript
/*
Diagonal Difference Solution.
sample matrix = [[1,2,3], [4,5,6], [7,8,9]]
*/
function diagonalDifference(matrix) {
// length of input matrix.
const length = matrix.length;
let diagonal1 = 0, diagonal2 = 0;
// Looping through the array and summing the diagonals.
@Yousha
Yousha / .gitignore
Last active May 1, 2024 04:55
.gitignore for PHP developers.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump