HTMLElement to Virtual DOM and back — clean JavaScript solution and code implementation for software engineering interview preparation. Read more →
Category: interview
-
Is Element in View
Is Element in View — clean JavaScript solution and code implementation for software engineering interview preparation. Read more →
-
accessKey
accessKey — clean JavaScript solution and code implementation for software engineering interview preparation. Read more →
-
Staircase using repeat()
Runtime Complexity: O(n^2) Demo String.prototype.repeat() Introduced in ES2015+, the repeat() method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together. Syntax: str.repeat(count)count is an… Read more →
-
Serialize / Deserialize
You can do in this in many ways, the following code does this using prefix traversal. Read more →
-
Generator Functions in JavaScript:
Introduction ES6 introduced new type of functions called Generator Functions. A function keyword with an asterisk * is used to define a generator function. Demo A Generator Function can be called as many times as desired. Every time… Read more →
-
Alien Dictionary
Given a list of words (Strings), generate the order of the language. If the given input is invalid you can return an empty string (''). Sometimes, multiple orders are possible. The following approach uses Topological Sort and DFS… Read more →
-
Maximum height by stacking Cuboids
Box stacking problem max height of stack possible (can be rotated). All the dimensions of the box beneath should be greater than the one stacked above it. Javascript Demo Read more →
-
Quicksort
Quicksort — clean JavaScript solution and code implementation for software engineering interview preparation. Read more →