Nodejs

Find the median of a stream of integers.

This technical problem deals with finding the median of a stream of integers. Given an example input of [1, 2, 3, 4, 5], the corresponding output would be the median at each point after a certain number of integers are added to the stream. Thus, after 1 integer is added to the stream, the median would be 1.5, and after 5 integers are added to the stream, the median would be 3.5.

85
Nov 24
Implement basic authentication in Node.js

This technical problem deals with implementing a basic authentication system in Node.js. The system should take in a username and password, and check if the credentials are valid. If the credentials are invalid , the system should output "Invalid credentials".

79
Nov 24
Longest string in array

This problem is about finding the longest string in an array. For example, if the input array is ["NodeJS", "Authentication", "Interview"], the function should return "Authentication ".

70
Nov 24
Sum of Array Elements

The problem is to find the sum of all the elements in an array. The input is an array of integers and the output should be the sum of all the elements in the array.

63
Nov 24
Calculating the Sum of an Array of Integers

To calculate the sum of an array of integers, simply add all the integers in the array together. In the example given, the sum would be 1 + 2 + 3 + 4 + 5 , or 15.

69
Nov 23
NodeJS / Authentication: Find User by Username

Given a list of user objects, this function will take in a username and return the corresponding user object if it exists. If the user does not exist, it will return null.

77
Nov 23
Find Lowest Positive Integer

Given an array of integers, this problem asks you to find the lowest positive integer that is not present in the array. You are to do this in linear time and constant space.

87
Nov 23
Sum of integers in an array

This technical problem deals with finding the sum of integers in an array. An example input is given as [1, 2, 3, 4], and the expected output is 10.

75
Nov 22