Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nishant-jain-94/nodejs-questions
Solutions to interview questions
https://github.com/nishant-jain-94/nodejs-questions
Last synced: 5 days ago
JSON representation
Solutions to interview questions
- Host: GitHub
- URL: https://github.com/nishant-jain-94/nodejs-questions
- Owner: nishant-jain-94
- Created: 2020-07-22T19:50:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T20:54:15.000Z (almost 2 years ago)
- Last Synced: 2023-03-03T08:33:22.677Z (over 1 year ago)
- Language: JavaScript
- Size: 79.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Interview Questions
## Questions and their corresponding files
1. Given an array, rotate the array to the right by k steps, where k is non-negative.
Example:
Input: [1,2,7,8,9] & k=3 (3 steps)
Output: [7,8,9,1,2]**SolutionFiles: [rotate-array.js](./rotate-array.js), [rotate-array.test.js](./rotate-array.js)**
1. Given a binary tree, find the height of the binary tree. (Mandatory)
Input: Root node of the tree
Output: Height of the tree**SolutionFiles: [node.js](./node.js), [binary-tree-height.js](./binary-tree-height.js), [binary-tree-height.test.js](./binary-tree-height.test.js)**
1. Find all combinations of a given string.
Example:
Input: “abc”
Output: {“”, a, b, c, ab, bc, ac, abc}
**SolutionFiles: [string-combinations.js](string-combinations.js), [string-combinations.test.js](string-combinations.test.js)**### Install all the dependencies
```bash
# Install all the dependencies
npm install
```### Run all the test cases
```bash
# Runs all the test cases
npm run test -- *.test.js
```