码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
移动开发-腾讯邮箱集成
分享一个最近写的腾讯邮箱集成方法: 1 package services.tencentmail.impl; 2 3 import net.sf.json.JSONObject; 4 import org.apache.commons.codec.binary.Base64; 5 import...
分类:移动开发   时间:2015-08-15 13:16:39    阅读次数:162
上下翻转二叉树
from?https://leetcode.com/problems/binary-tree-upside-down/; 一个列子:在翻转前 ????1 ???/???2???3 ?/?4???5 翻转后: ???4 ??/??5???2 ????/????3???1 先...
分类:其他好文   时间:2015-08-15 12:10:33    阅读次数:196
[LintCode] Count 1 in Binary
Count how many1in binary representation of a 32-bit integer.ExampleGiven32, return1Given5, return2Given1023, return9ChallengeIf the integer isnbits wi...
分类:其他好文   时间:2015-08-15 10:20:08    阅读次数:142
【LeetCode-面试算法经典-Java实现】【129-Sum Root to Leaf Numbers(所有根到叶子结点组组成的数字相加)】
【129-Sum Root to Leaf Numbers(所有根到叶子结点组组成的数字相加)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题  Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.   An example...
分类:编程语言   时间:2015-08-15 06:44:54    阅读次数:114
[Leetcode] Binary tree travelsal (preorder, inorder, postorder)
一、前序 1 public List preOrder(Node root){ 2 List res = new LinkedList(); 3 Stack stack = new Stack(); 4 stack.push(root); 5 while(root!=...
分类:其他好文   时间:2015-08-15 01:28:01    阅读次数:116
LeetCode-Balanced Binary Tree
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe...
分类:其他好文   时间:2015-08-14 19:18:52    阅读次数:123
LeetCode-Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tree {3,9,20,#,#,15,7}, 3 / 9 20...
分类:其他好文   时间:2015-08-14 19:11:16    阅读次数:88
BSD介绍
BSD许可证模板* Copyright (c) 1998, Regents of the University of California* All rights reserved.* Redistribution and use in source and binary forms, with o...
分类:其他好文   时间:2015-08-14 18:40:59    阅读次数:158
pat(A) 1064. Complete Binary Search Tree(完全二叉树的中序建树)
代码: #include #include #define N 1005 using namespace std; int a[N]; int T[N]; int pos; int n; int cmp(int a,int b) { return an) return; int l=i<<...
分类:其他好文   时间:2015-08-14 17:07:22    阅读次数:161
[LeetCode] Kth Smallest Element in a BST
Given a binary search tree, write a functionkthSmallestto find thekth smallest element in it.Note:You may assume k is always valid, 1 ≤ k ≤ BST's tota...
分类:其他好文   时间:2015-08-14 16:58:03    阅读次数:98
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!