码迷,mamicode.com
首页 >  
搜索关键字:翻转    ( 2706个结果
iOS CoreAnimation(核心动画二)
CATransition :转场动画 翻转动画@interface ViewController ()- (IBAction)previous:(UIButton *)sender;- (IBAction)next:(UIButton *)sender;@property (strong, nona...
分类:移动开发   时间:2015-09-09 21:18:33    阅读次数:237
LeetCode#226 Invert Binary Tree
Invert Binary Tree翻转二叉树下面我们分别用java和python实现两种解决方案(两种解决方案可以完全用java或python实现:方案一:(java)/*** Definition for a binary tree node.* public class TreeNode {*...
分类:其他好文   时间:2015-09-08 21:49:05    阅读次数:139
[LintCode] Invert Binary Tree 翻转二叉树
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.ExampleGiven 4 points:(1,2),(3,6),(0,0),(1,3).The max...
分类:其他好文   时间:2015-09-08 06:57:23    阅读次数:171
二叉树的创建、遍历、翻转
BinaryTreeNode.h//// BinaryTreeNode.h// BinaryTree//// Created by KeSen on 15/9/7.// Copyright (c) 2015年 KeSen. All rights reserved.//#import @cla...
分类:其他好文   时间:2015-09-07 12:35:07    阅读次数:180
ViewPager中属性
这里主要解释下后两个属性是什么意思android:flipInterval; flip是替换,翻转;Interval是间隔; 我一直理解为两张图片或两个fragment切换的时间 而网上有人解释是设置里面每一个View的显示时间实际上网上大神说的是对的 如果是自动切换的话就是每个view的显示时间 ...
分类:其他好文   时间:2015-09-06 18:01:33    阅读次数:227
UVA 11922(Splay
题目:维护一个序列,支持将一段数翻转并插到最后的操作,最后输出整个序列。思路:直接套的大白模板,第一次用splay,贴一下。。/**@author: Cwind*http://www.cnblogs.com/Cw-trip/*/#include #define pb push_back#defin....
分类:其他好文   时间:2015-09-06 17:49:44    阅读次数:195
Palindrome Number 回文数
判断一个数字是否是回文数,尝试不用其他额外空间。注意:负数也有可能成为回文数吗?如果你想让int转为string,注意不用其他空间这个约束。你也可以翻转一个int,但是有可能会溢出。 1 public class Solution { 2 public boolean isPalindrom...
分类:其他好文   时间:2015-09-04 11:01:30    阅读次数:127
HDU 3695-Computer Virus on Planet Pandora(ac自动机)
题意:给一个母串和多个模式串,求模式串在母串后翻转后的母串出现次数的的总和。分析:模板题/*#include #include #include #include #include using namespace std;const int maxnode = 250*1000+10000;cons...
分类:Web程序   时间:2015-09-03 23:13:39    阅读次数:193
翻转单词顺序列
JOBDU最近来了一个新员工Fish,每天早晨总是会拿着一本英文杂志,写些句子在本子上。同事Cat对Fish写的内容颇感兴趣,有一天他向Fish借来翻看,但却读不懂它的意思。例如,“student. a am I”。后来才意识到,这家伙原来把句子单词的顺序翻转了,正确的句子应该是“I am a st...
分类:其他好文   时间:2015-09-02 02:02:30    阅读次数:177
2.字符串翻转
思路很重要:获取字符串长度,两头交换相应字符。核心代码: 1 void swap(char &x,char &y) 2 { 3 x = x^y; 4 y = x^y; 5 x = x^y; 6 } 7 void reverse(char *s) 8 { 9 int i...
分类:其他好文   时间:2015-09-02 00:00:30    阅读次数:407
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!