摘要:
原题 You are given a map in form of a two dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally 阅读全文
摘要:
原题 An image is represented by a binary matrix with 0 as a white pixel and 1 as a black pixel. The black pixels are connected, i.e., there is only one 阅读全文
摘要:
原题 A pupil Tim gets homework to identify whether three line segments could possibly form a triangle. However, this assignment is very heavy because th 阅读全文
摘要:
原题 Given a non empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: Input: 3 / \ 9 20 / \ 15 7 O 阅读全文
摘要:
原题 In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original da 阅读全文
摘要:
原题 Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of 阅读全文
摘要:
原题 Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order 阅读全文
摘要:
原题 Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Ex 阅读全文
摘要:
最近回顾了一下排序算法,发现有些算法还是很绕的,重新梳理一遍,总结如下 很多算法已经忘了,还能流利的写出来的就只有冒泡和选择了,其他排序都是先回顾了一下算法,然后才边调试边写的 其中的基数排序。。感觉很少用,暂时没有梳理,后面再补充 插入排序 分为直接插入和希尔排序,希尔其实就是插入排序的增量版 直 阅读全文
摘要:
原题 Given a nested list of integers, return the sum of all integers in the list weighted by their depth. Each element is either an integer, or a list w 阅读全文