摘要:
Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a ... 阅读全文
摘要:
Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column are set to 0.There is a same problem in leetcode. We could... 阅读全文
摘要:
Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do th... 阅读全文
摘要:
Implement a method to perform basic string compression using the counts of repeated characters. For example, the string aabcccccaaa would become a2blc... 阅读全文