上一页 1 2 3 4 5 6 7 ··· 41 下一页
摘要: 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? Similar Questions Palindrome Numbe 阅读全文
posted @ 2017-07-21 20:21 Deribs4 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thi 阅读全文
posted @ 2017-07-21 11:24 Deribs4 阅读(107) 评论(0) 推荐(0) 编辑
摘要: For an integer n, we call k>=2 a good base of n, if all digits of n base k are 1. Now given a string representing n, you should return the smallest go 阅读全文
posted @ 2017-07-21 11:02 Deribs4 阅读(421) 评论(0) 推荐(0) 编辑
摘要: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Here a 阅读全文
posted @ 2017-07-19 14:15 Deribs4 阅读(134) 评论(0) 推荐(0) 编辑
摘要: There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every 阅读全文
posted @ 2017-07-19 13:46 Deribs4 阅读(131) 评论(0) 推荐(0) 编辑
摘要: You are given two jugs with capacities x and y litres. There is an infinite amount of water supply available. You need to determine whether it is poss 阅读全文
posted @ 2017-07-18 19:17 Deribs4 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, ex 阅读全文
posted @ 2017-07-16 17:20 Deribs4 阅读(241) 评论(0) 推荐(0) 编辑
摘要: WinEdit的菜单栏中:Options->Execution Modes 弹出的界面见下面的图: 看上图中“1”所示位置,后面3项出现了“?”号(出现“系统找不到指定的文件”的错误时,所有项后面都会有“?”号),这说明系统找不到可执行程序。如何解决呢?在上图中切换到第二个选项卡“TeX Syste 阅读全文
posted @ 2017-07-09 16:02 Deribs4 阅读(2778) 评论(0) 推荐(0) 编辑
摘要: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 标签 Hash Table Math 类似题目 (M) Line Reflection 标签 Has 阅读全文
posted @ 2017-03-25 15:48 Deribs4 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the  阅读全文
posted @ 2017-03-25 13:36 Deribs4 阅读(113) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 41 下一页