- Write a solutions of the task/problem thoroughly using any approach you comfortable with (readability, queality, efficiency matter
☺️ ). - Every task should have some explanation or step process of how you solved the problem/task.
- After you finish, create a Gist file in your own Github account and put your solution in that file.
- Send your solutions (link to the Gist file) to [email protected] with
"Recruitment Process - Technical Screening [SRD-2023]"as a subject field
⚠️ Use typescript as the primary language for the solutions! https://www.typescriptlang.org/play
-
Create a function that takes multiple functions as an arguments (function composition) by returning a function that accepts one argument (see example below)
const square = v => v * v const double = v => v * 2 const addOne = v => v + 1 const res = pipey(square, double, addOne) res(3) // 19; addOne(double(square(3)))
-
Find the intersection of two arrays, the intersection would be the common elements that exists within both arrays. For this case, these elements should be unique!
const firstArray = [2, 2, 4, 1]; const secondArray = [1, 2, 0, 2]; intersection(firstArray, secondArray); // [2, 1]
-
Given a string an angle brackets, such as '<><<><>>', write a function that makes a angle brackets string match (balanced the structure)
// '><<><' => '<><<><>>' const resultBracket = processAngleBrackets('><<><'); console.log(`Output 1: ${resultBracket}`); console.log(`Expected ouput 1: <><<><>>`);
-
Write a function that takes the Object of number with nested item as an argument, and then returns the array of unique number from that Object.
getUniqueSortedNumbers({ a: { x: 3, y: { d: 2, e: 2, f: { g: 4 }, z: 8 } } })