Skip to content

Instantly share code, notes, and snippets.

View 001123's full-sized avatar
🎯
Focusing

Bui Khuong Duy 001123

🎯
Focusing
View GitHub Profile
@001123
001123 / minMaxSum.js
Last active March 17, 2025 04:43
minMaxSum.js
const minMaxSum = (arr, n) => [
arr.sort().splice(0, n).reduce((a,b) => a + b, 0 ),
arr.sort((a,b) => b - a).splice(0, n).reduce((a,b) => a + b, 0 )
]
function drawHeart(size) {
let heart = '';
// Phần trên của trái tim
for (let i = size / 2; i <= size; i += 2) {
// Khoảng trống bên trái
for (let j = 1; j < size - i; j += 2) {
heart += ' ';
}
// Ký tự bên trái
@001123
001123 / semantic-commit-messages.md
Created August 29, 2021 14:42 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example