码迷,mamicode.com
首页 >  
搜索关键字:pairs    ( 1028个结果
【leetcode】22. Generate Parentheses
题目描述: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. 解题分析: 这类题一般都要用递归的方法来解决。需要设两个集合类分别存储待匹配的( ...
分类:其他好文   时间:2016-07-05 01:09:06    阅读次数:180
【leetcode】24. Swap Nodes in Pairs
题目描述: Given a linked list, swap every two adjacent nodes and return its head. 解题分析: 解题思路很简单,就是先两两扫描,然后调换顺序即可。这道题的难点在于每个节点的next域指向问题,所以解这样的题最好可以在纸上写一下交 ...
分类:其他好文   时间:2016-07-05 01:02:14    阅读次数:141
Codeforces 159D Palindrome pairs
http://codeforces.com/problemset/problem/159/D 题目大意: 给出一个字符串,求取这个字符串中互相不覆盖的两个回文子串的对数。 思路:num[i]代表左端点在i这个位置的回文串个数,然后用树状数组维护sum[i],代表回文串右端点小于等于i的回文串数,总复 ...
分类:其他好文   时间:2016-06-29 21:54:33    阅读次数:143
TimesTen 数据库复制学习:8. 管理Active Standby Pair(带缓存组)
带缓存组的Active standby pairs(ASP)在不带缓存组的ASP中,复制发生在TimesTen的表间;而在带缓存组的ASP中,复制发生在cache table之间。带缓冲组的复制仅支持只读和AWT缓存组。对于只读缓存组,复制的意义在于保持状态的连续,而对于AWT,复制可以保证数据不丢失。设置带只读缓存组的ASP(例)假设active master为cachedb1,standby m...
分类:数据库   时间:2016-06-28 12:56:16    阅读次数:337
leetcode 332 Reconstruct Itinerary
题目连接 https://leetcode.com/problems/reconstruct-itinerary/ Reconstruct Itinerary Description Given a list of airline tickets represented by pairs of de ...
分类:其他好文   时间:2016-06-24 00:07:30    阅读次数:182
poj3096
C++的标准模版库的应用 Surprising Strings Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6625 Accepted: 4309 Description The D-pairs of a string of ...
分类:其他好文   时间:2016-06-20 17:11:48    阅读次数:182
[bzoj1807] [Ioi2007]Pairs 彼此能听得见的动物对数
这题挺神的...膜了半天claris的题解还有官方题解。。 一维随便搞, 二维的话就旋转坐标系,把原来的点(x,y)变成(x+y,x-y),把曼哈顿距离变成切比雪夫距离。然后排序后扫描线,树状数组维护。 三维的话.....官方题解是旋转坐标系后直接三维树状数组?(吓哭 Claris的题解说只要旋转后 ...
分类:其他好文   时间:2016-06-19 12:54:56    阅读次数:201
Java并发编程-同步辅助类之Exchanger
Exchanger是自jdk1.5起开始提供的工具套件,一般用于两个工作线程之间交换数据。在本文中我将采取由浅入深的方式来介绍分析这个工具类。首先我们来看看官方的api文档中的叙述:A synchronization point at which threads can pair and swap elements within pairs. Each thread presents some ob...
分类:编程语言   时间:2016-06-12 03:16:07    阅读次数:138
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. Yo ...
分类:其他好文   时间:2016-06-08 12:11:21    阅读次数:151
Two Sum II
Given an array of integers, find how many pairs in the array such that their sum is bigger than a specific target number. Please return the number of ...
分类:其他好文   时间:2016-06-06 16:42:07    阅读次数:185
1028条   上一页 1 ... 62 63 64 65 66 ... 103 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!