โœ๏ธ Content byMd. Rakibul Islam
1

Implement a curry function that transforms a function with multiple arguments into a sequence of functions, each accepting a single argument.

โ†’
2

Implement a throttle function that limits how often a function can be called. The function should execute at most once per specified time window.

โ†’
3

Implement an LRU (Least Recently Used) Cache with a fixed capacity. It should support get(key) and put(key, value) operations in O(1) time.

โ†’
4

Implement a function composition utility that takes any number of functions and returns a new function that applies them right-to-left.

โ†’
5

Implement a deep clone function using structuredClone semantics manually (handle nested objects and arrays, but not requiring Map/Set support).

โ†’
6

Implement a memoize function that supports custom cache key resolution via an optional resolver function.

โ†’
7

Implement the Singleton design pattern in JavaScript using a class with a static instance getter.

โ†’
8

Implement the Factory design pattern: a ShapeFactory that creates Circle, Square, or Rectangle instances based on a type string.

โ†’
9

Implement a function that flattens an object with nested objects into a single-level object with dot-notation keys.

โ†’
10

Implement an async pool/queue that processes an array of items with a given async worker function and a concurrency limit, returning all results in original order.

โ†’
11

Implement a simple pub/sub (publish/subscribe) message bus supporting topic-based subscriptions and wildcard '*' subscribers that receive all messages.

โ†’
12

Implement a function that performs merge sort on an array.

โ†’
13

Implement a Trie (prefix tree) data structure with insert, search, and startsWith methods.

โ†’
14

Implement a function that performs a binary search on a rotated sorted array (an array sorted ascending then rotated at some pivot).

โ†’
15

Implement a rate limiter class using the sliding window algorithm: allow at most N calls within any rolling time window of W milliseconds.

โ†’
16

Implement a function that performs topological sort on a directed acyclic graph represented as an adjacency list.

โ†’
17

Implement a function that memoizes an async function, sharing in-flight requests so concurrent calls with the same key don't trigger duplicate work.

โ†’
18

Implement a simple state machine class that transitions between named states based on defined events, rejecting invalid transitions.

โ†’
19

Implement a function that finds the longest increasing subsequence (LIS) length in an array of numbers using dynamic programming.

โ†’
20

Implement a simple dependency injection container supporting registering factories and resolving singleton or transient instances.

โ†’

Showing 1โ€“20 of 50 questions

Javascript CODE Interview Questions โ€” All Levels | UyTech