const pets = ['Cat', 'Dog', 'Bird', 'Fish', 'Frog', 'Hamster', 'Pig', 'Horse' 'Lion', 'Dragon'];
// Print all pets
console.log(pets[0]);
console.log(pets[1]);
console.log(pets[2]);
console.log(pets[3]);
...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function catAndMouse(x, y, z) { | |
const diffA = Math.abs(z-x); | |
const diffB = Math.abs(z-y); | |
if(diffA === diffB) return "Mouse C"; | |
return diffA < diffB ? "Cat A" : "Cat B"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function saveThePrisoner(n, m, s) { | |
return (m%n+s-1)%n ? (m%n+s-1)%n : n | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function angryProfessor(k, a) { | |
const onTimeStudents = a.filter(s => s <= 0).length | |
return onTimeStudents >= k ? "NO" : "YES" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
this is an algo peoblem from hacker rank https://www.hackerrank.com/challenges/counting-valleys/problem?isFullScreen=true | |
*/ | |
function countingValleys(steps, path) { | |
let count = 0; | |
let level = 0; | |
path.split("").forEach(unit => { | |
if(unit === "D") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
https://www.hackerrank.com/challenges/drawing-book/problem?isFullScreen=true | |
Given and , find and print the minimum number of pages that must be turned in order to arrive at page . | |
*/ | |
function pageCount(n, p) { | |
let index = 0; | |
const chunks = []; | |
const arr = [...Array(n + 1).keys()]; | |
for (let i = 0; i < arr.length; i += 2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function jumpingOnClouds(c, k) { | |
let index = 0; | |
let energy = 100; | |
let stop = false; | |
while (!stop) { | |
if (c[index] === 1) { | |
energy -= 2; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'], | |
setupFiles: ['./test-setup.js'] | |
} |
- metalrobot Металлический конструктор
- inkdatatable An Inkscape extension for creating tables with text fields
- textext Inkscape LaTeX plugin originally from http://pav.iki.fi/software/textext/
- inkscape-gs An inkscape's extension to create guides with offset, useful to create a grid system.
- NiceCharts An Inkscape-extension to draw charts
- gdadin GUI to Draw Algorithms Designed with Inkscape
NewerOlder