摘要: Given a non empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4 directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2018-09-26 16:24 bernieloveslife 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2] Example 2: Input: num 阅读全文
posted @ 2018-09-26 15:46 bernieloveslife 阅读(85) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree with non negative values, find the minimum absolute difference between values of any two nodes. Example: Input: 1 \ 3 / 2 O 阅读全文
posted @ 2018-09-26 15:36 bernieloveslife 阅读(82) 评论(0) 推荐(0) 编辑
摘要: Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non white 阅读全文
posted @ 2018-09-26 15:13 bernieloveslife 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1: Example 2: Example 3: 阅读全文
posted @ 2018-09-26 14:20 bernieloveslife 阅读(103) 评论(0) 推荐(0) 编辑