Given an ordered list of employees who used their badge to enter or exit the room, write a function that returns two collections: 1. All employees who didn't use their badge while exiting the room – they recorded… Read more →
Category: interview
-
Implement getElementById() polyfill
Implement a method to search for an element in DOM by it's Id. We use Breadth First Search (BFS) algorithm to traverse the DOM and store the elements in a queue in the following example.Example: document.getElementById('demo') Demo Read more →
-
Valid Parentheses
Valid Parentheses — clean JavaScript solution and code implementation for software engineering interview preparation. Read more →
-
HTML element as a datastore
The dataset read-only property of the HTMLElement interface provides read/write access to custom data attributes (data-*) on elements. It exposes a map of strings (DOMStringMap) with an entry for each data- attribute. HTMLElement.dataset Demo Read more →
-
Minimum Window Substring
Minimum Window Substring — clean JavaScript solution and code implementation for software engineering interview preparation. Read more →
-
Maximum Subarray of size K
Maximum Subarray of size K — clean JavaScript solution and code implementation for software engineering interview preparation. Read more →
-
Largest Subarray Length K
Largest Subarray Length K — clean JavaScript solution and code implementation for software engineering interview preparation. Read more →