摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Solution 阅读全文
posted @ 2016-11-23 00:05 MiaBlog 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space? Solution 1 (loop through and use 阅读全文
posted @ 2016-11-19 05:08 MiaBlog 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Reverse a singly linked list. Solution 1 (recursion) Solution 2 Iteration 阅读全文
posted @ 2016-11-19 04:01 MiaBlog 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Return the pivot index of the given array of numbers. The pivot index is the index where the sum of the numbers on the left is equal to the sum of the 阅读全文
posted @ 2016-11-12 06:24 MiaBlog 阅读(198) 评论(0) 推荐(0) 编辑
摘要: My last column in Datatable is link, but only work on the first page, whenever I changed the page number or number shown on page the links were not wo 阅读全文
posted @ 2016-11-10 05:10 MiaBlog 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2 阅读全文
posted @ 2016-11-08 06:29 MiaBlog 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Note: Solution: Because "There are many 阅读全文
posted @ 2016-11-08 05:19 MiaBlog 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen 阅读全文
posted @ 2016-11-07 23:47 MiaBlog 阅读(129) 评论(0) 推荐(0) 编辑