Dump it here! Let others learn from you
This problem was asked Microsoft. Using a read7 method that returns 7 characters from a file, implement readN n which reads n characters. For example, given a file with the content “Hello world”, th
This problem was asked by Microsoft. Given a 2D matrix of characters and a target word, write a function that returns whether the word can be found in the matrix by going left to right, or up to down.
This problem was asked by Microsoft. Implement a URL shortener with the following methods shorten url , which shortens the url into a six character alphanumeric string, such as zLg6wl. restore short ,
This problem was asked by Microsoft. Suppose an arithmetic expression is given as a binary tree. Each leaf is an integer and each internal node is one of + , − , ∗ , or . Given the root to such a tree
This problem was asked by Microsoft. A number is considered perfect if its digits sum up to exactly 10. Given a positive integer n, return the n th perfect number. For example, given 1, you should ret
Solving array rotation problem is one of my favourite problem You have to rotate a 2D array with certain conditions This simple question has been asked in many different interviews in companies includ