码迷,mamicode.com
首页 >  
搜索关键字:pairs    ( 1028个结果
leetcode 336. Palindrome Pairs
传送门 Given a list of unique words. Find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e. words[ ...
分类:其他好文   时间:2016-05-10 16:45:27    阅读次数:397
HackerRank "New Year Chaos"
Two tricks here: 1. Counting no. of inversed pairs - using Merge Sort, nothing special 2. How to check 'chaotic'? We simply check if any number is ove ...
分类:其他好文   时间:2016-05-07 15:01:28    阅读次数:132
LeetCode-Swap Nodes in Pairs
这道题考验链表的遍历, 切记要加上一个dummy head, 并且区分index的单偶数,不难 ...
分类:其他好文   时间:2016-05-03 01:56:47    阅读次数:126
Palindrome Pairs
Given a list of unique words. Find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e. words[i] + ...
分类:其他好文   时间:2016-05-02 07:05:56    阅读次数:279
leetcode 24. Swap Nodes in Pairs(链表)
Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Your a ...
分类:其他好文   时间:2016-04-30 15:31:00    阅读次数:158
22. Generate Parentheses (backTracking)
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: " ...
分类:其他好文   时间:2016-04-24 07:33:06    阅读次数:238
Leetcode题目:Swap Nodes in Pairs
题目:Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Yo ...
分类:其他好文   时间:2016-04-23 21:23:08    阅读次数:175
【一天一道LeetCode】#22. Generate Parentheses
一天一道LeetCode(一)题目 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: “((()))”, “(()...
分类:其他好文   时间:2016-04-22 20:58:04    阅读次数:131
LeetCode之22----Generate Parentheses
题目: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(()...
分类:其他好文   时间:2016-04-22 20:41:02    阅读次数:182
LeetCode之24----Swap Nodes in Pairs
题目: Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant...
分类:其他好文   时间:2016-04-22 19:46:19    阅读次数:131
1028条   上一页 1 ... 64 65 66 67 68 ... 103 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!