上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 37 下一页
摘要: Write a function to find the longest common prefix string amongst an array of strings. 找出字符串数组中最长的公共前缀。 思路:将字符串数组中每个字符串左对齐,排成一列,然后依次对比每个字符串的相同位置的字母。 如 阅读全文
posted @ 2017-11-17 20:20 immjc 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word 阅读全文
posted @ 2017-11-16 12:06 immjc 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Example 2: Note: 判断最多去掉一个字母后回 阅读全文
posted @ 2017-11-16 10:54 immjc 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 信号槽是Qt的核心机制之一,信号槽简单的来说就是两个对象及两个对象问答行为。 例如:发送者(Sender)发出信号(SIGNAL)、接收者(Receiver)做出反应(SLOT)。利用connect函数将这两个对象及其行为联系起来。 一个简单的例子如下,创建一个button,Clicked butt 阅读全文
posted @ 2017-11-14 21:05 immjc 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list "parts". The length of each 阅读全文
posted @ 2017-11-13 22:12 immjc 阅读(462) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums, write a method that returns the "pivot" index of this array. We define the pivot index as the index where the sum of 阅读全文
posted @ 2017-11-12 18:28 immjc 阅读(663) 评论(0) 推荐(0) 编辑
摘要: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You may assume that nums1 has enough space (size tha 阅读全文
posted @ 2017-11-10 09:55 immjc 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, return -1. For 阅读全文
posted @ 2017-11-09 11:43 immjc 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer c, your task is to decide whether there're two integers a and b such that a2 + b2 = c. Example 1: Input: 5 Output: True E 阅读全文
posted @ 2017-11-09 10:36 immjc 阅读(186) 评论(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 @ 2017-11-08 15:39 immjc 阅读(315) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 37 下一页