上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 27 下一页
摘要: // #define USING_HASH_SET// ==++==// // Copyright (c) Microsoft Corporation. All rights reserved.// // ==--==/*============================================================**** Class: SortedSet****... 阅读全文
posted @ 2017-07-02 10:54 xiejunzhao 阅读(368) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Data.SqlClient;namespace SQLHelper { class Program { static void Main(strin... 阅读全文
posted @ 2017-07-02 10:52 xiejunzhao 阅读(386) 评论(0) 推荐(0)
摘要: Given an integer array, find three numbers whose product is maximum and output the maximum product.Example 1:Input: [1,2,3] Output: 6 Example 2:Input: [1,2,3,4] Output: 24 Note:The length of the given... 阅读全文
posted @ 2017-06-25 21:40 xiejunzhao 阅读(241) 评论(0) 推荐(0)
摘要: Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given BST.Assume a BST is defined as follows:The left subtree of a node contains on... 阅读全文
posted @ 2017-06-25 16:35 xiejunzhao 阅读(706) 评论(0) 推荐(0)
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between tw... 阅读全文
posted @ 2017-06-22 23:53 xiejunzhao 阅读(157) 评论(0) 推荐(0)
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \ 3 4 4 3 But the... 阅读全文
posted @ 2017-06-20 00:31 xiejunzhao 阅读(352) 评论(0) 推荐(0)
摘要: Total Accepted: 5540Total Submissions: 14066Difficulty: EasyContributors:love_FawnWe define a harmonious array is an array where the difference between its maximum value and its minimum value is exact... 阅读全文
posted @ 2017-06-18 23:27 xiejunzhao 阅读(437) 评论(0) 推荐(0)
摘要: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree [3,9,20,null,null,15,7], ... 阅读全文
posted @ 2017-06-18 21:40 xiejunzhao 阅读(147) 评论(0) 推荐(0)
摘要: Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.You need to merge them into a new binary tree. ... 阅读全文
posted @ 2017-06-18 10:01 xiejunzhao 阅读(181) 评论(0) 推荐(0)
摘要: 把LeetCode二叉树题目的测试数组,转换成二叉树using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Algorithm { class TreeNode { public int val; ... 阅读全文
posted @ 2017-06-17 21:48 xiejunzhao 阅读(866) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 27 下一页