Skip to content

Instantly share code, notes, and snippets.

View ngimdock's full-sized avatar
🐻
bear

ngimdock ngimdock

🐻
bear
View GitHub Profile
@ngimdock
ngimdock / task2.ts
Last active January 14, 2026 22:00
const CAT_FACT_API_BASE_URL = "https://catfact.ninja";
type CatFactResponse = {
fact: string;
length: number;
};
type CleanCatFact = {
text: string;
length: number;
@ngimdock
ngimdock / task1.ts
Last active January 14, 2026 21:59
function findUniquePairs(arr: number[], target: number): number[][] {
if (arr.length < 2) return [];
const result: number[][] = [];
const nums = [...arr].sort((a, b) => a - b);
let left = 0;
let right = nums.length - 1;
while (left < right) {