Machine Learning Engineer, Algorithms and Programming

[1] Find Median from Data Stream — Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value.

[1] Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k.

Example:

Input:nums = [1,1,1], k = 2Output: 2

I am going to discuss a very useful data structure in Redis — The Sorted Sets.

[1] Given an int array wood representing the length of n pieces of wood and an int k. It is required to cut these pieces of wood such that more or equal to k pieces of the same length len are cut. What is the longest len you can get?

[1] Find the length of the longest substring with k unique characters in a given string.

"aabbcc", k = 3There are substrings with exactly 3 unique characters{"aabbcc" , "abbcc" , "aabbc" , "abbc" }Max is…