06 2015 档案
摘要:Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Exampl
阅读全文
摘要:Given the head of a linked list, remove the nth node from the end of the list and return its head. Example 1: Input: head = [1,2,3,4,5], n = 2 Output:
阅读全文
摘要:Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. Note: The algorithm should run in linear time and in O(1) spa
阅读全文
摘要:You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list
阅读全文
摘要:Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The order of the elements may be changed. Then return
阅读全文
摘要:Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Exampl
阅读全文
摘要:Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". Update (2015-02-12): For C
阅读全文
摘要:终于将LeetCode的大部分题刷完了,真是漫长的第一遍啊,估计很多题都忘的差不多了,这次开个题目汇总贴,并附上每道题目的解题连接,方便之后查阅吧~ 博主还制作了一款 网页版APP,方便大家进行查阅,网址如下: https://grandyang.com 对应的 Github 项目 的同步地址如下,
阅读全文
摘要:Given a sorted integer array without duplicates, return the summary of its ranges. Example 1: Example 2: Credits:Special thanks to @jianchao.li.fighte
阅读全文
摘要:相机参数如下,参见这里:Resolution1624 x 1224Frame Rate30 FPSMegapixels2.0 MPChromaColorSensor NameSony ICX274Sensor TypeCCDReadout MethodGlobal shutterSensor For...
阅读全文
摘要:Implement a basic calculator to evaluate a simple expression string. The expression string contains only non-negativeintegers, +, -, *, / operators an
阅读全文
摘要:原文地址:http://www.licai.com/yuedu/201411-62884.html如果你对各大耳熟能详的国际酒店管理集团还有什么问题,相信今天和你分享的各大酒店集团家族系谱图和最全介绍会帮助到你很多。不管你是酒店行业人士还是高端酒店控,都不要错过这次风暴般的洗脑。 一、洲际酒店集团(...
阅读全文
摘要:QRadioButton 控件是Qt中实现多选一功能的控件,它的使用方法如下:声明控件:QRadioButton *rbutton;然后实现它的响应函数:void YourClass::on_rbutton_toggled(bool state) { // Implement here if (...
阅读全文
摘要:在Qt中,QLineEdit是文本编辑框控件,是比较基础且常用的控件的之一,下面是其的一些基本操作。 比如: 禁用或启用该控件 设置内容或者返回内容: 将控件设为只读模式: 控件只接受整型或者浮点型: 文本改变响应函数:
阅读全文
摘要:Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. get(key) - Get the
阅读全文
摘要:原文地址: http://www.3798.com/archives/596.html接着对我们这种不是某个酒店忠诚客户的用户选择卡片进行分析。首先要强调的是,我们比较的是信用卡项目本身,而不是酒店忠诚计划的好坏。个人感觉,对于酒店信用卡,最重要的是开卡奖励的价值、附送的会员等级以及年费成本。至于每...
阅读全文
摘要:Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. Example 1: Example 2: 这道题给了我们一堆二维点,然后让求最大的共线点的个数,根
阅读全文
摘要:Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is
阅读全文
摘要:There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following re
阅读全文
摘要:Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired by thi...
阅读全文
摘要:Implement a basic calculator to evaluate a simple expression string. The expression string may contain open ( and closing parentheses ), the plus + or
阅读全文
摘要:Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. to
阅读全文
摘要:Given a complete binary tree, count the number of nodes. Note: Definition of a complete binary tree from Wikipedia:In a complete binary tree every lev
阅读全文
摘要:Find the total area covered by two rectilinearrectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top right corner as sh
阅读全文
摘要:Given a 2D board containing 'X' and 'O'(the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in t
阅读全文
摘要:stack, deque 和 queue这三个c++的STL的数据结构很类似但又各有不同。stack是堆栈,没有迭代器,特点是后进先出。用push()将元素压入栈中,top()返回栈顶元素,pop()移除栈顶元素。deque是双端队列,支持迭代器,使用push_back()在队尾添加元素,pop_b...
阅读全文
摘要:Given an m x n binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Example 1: Input: matrix = [["1
阅读全文
摘要:Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such th
阅读全文
摘要:Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j]
阅读全文