上一页 1 2 3 4 5 6 ··· 29 下一页
摘要: Given a robot cleaner in a room modeled as a grid.Each cell in the grid can be empty or blocked.The robot cleaner with 4 given APIs can move forward, 阅读全文
posted @ 2018-10-03 14:17 jasminemzy 阅读(726) 评论(0) 推荐(0) 编辑
摘要: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the o 阅读全文
posted @ 2018-10-03 13:05 jasminemzy 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array of integers nums and integer values a, b and c. Apply a quadratic function of the form f(x) = ax2 + bx + c to each element x in t 阅读全文
posted @ 2018-10-03 12:47 jasminemzy 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given a C++ program, remove comments from it. The program source is an array where source[i] is the i-th line of the source code. This represents the 阅读全文
posted @ 2018-10-03 11:17 jasminemzy 阅读(236) 评论(0) 推荐(0) 编辑
摘要: You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose o 阅读全文
posted @ 2018-10-03 10:03 jasminemzy 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: 阅读全文
posted @ 2018-10-02 13:48 jasminemzy 阅读(111) 评论(0) 推荐(0) 编辑
摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calcula 阅读全文
posted @ 2018-10-02 13:34 jasminemzy 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 268. Missing NumberGiven an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.Example 1:Inpu 阅读全文
posted @ 2018-10-02 13:29 jasminemzy 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list, determine if it is a palindrome. Example 1: Input: 1->2 Output: false Example 2: Input: 1->2->2->1 Output: true Follow up: 阅读全文
posted @ 2018-09-26 03:09 jasminemzy 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0. Example 1 阅读全文
posted @ 2018-09-26 02:34 jasminemzy 阅读(113) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 29 下一页