C++
文章平均质量分 78
HOMERUNIT
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Right-heavy tree——笛卡尔树
一、Problem Description: A right-heavy tree is a binary tree where the value of a node is greater than or equal to the values of the nodes in its left subtree and less than the values of the nodes原创 2016-05-23 20:29:24 · 664 阅读 · 0 评论 -
Leetcode-6. ZigZag Conversion
一、问题描述 The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H原创 2017-12-27 14:51:03 · 298 阅读 · 0 评论 -
Sicily 1001 Alphacode
Sicily 1001 Alphacode 动态规划 一、问题描述 Alice and Bob need to send secret messages to each other and are discussing ways to encode their messages: Alice: "Let's just use a very simple code: We'll assi原创 2016-09-27 23:01:39 · 342 阅读 · 0 评论 -
Tricky Priority Queue
1. Problem Description: The only printer in the computer science students' union is experiencing an extremely heavy workload. Sometimes there are a hundred jobs in the printer queue and you may have原创 2016-05-06 23:47:35 · 481 阅读 · 0 评论 -
Simple Calculator with Exeption Handling
Knowledge points Exception Handling(try, catch and throw), polymorphic, string Introduction We are going to write a program to calculate a string with some simbols, say a simple calculator. You nee原创 2016-04-29 21:19:53 · 993 阅读 · 0 评论 -
各种方法建立二叉树
各种方法建立二叉树 //非递归建立二叉树 struct node{ char data; node* left; node* right; }; void createtree() { node* q; node* tree[max]; int i, j; char val; node* root = NULL; cin >> i >> val; while (i !=原创 2016-05-25 20:14:04 · 658 阅读 · 0 评论 -
带权值二叉树的路径最长值与路径
一、Problem Given a binary tree, every node has a weight, then you need to find out the path that can make the total weight of all nodes it go through is the maximum and show the path. The weight is al原创 2016-05-25 19:54:38 · 2565 阅读 · 0 评论 -
迷宫——广度优先搜索
一、Problem description You are provided a maze(迷宫), and you need to program to find the least steps to walk from the start to the end.And you can only walk in four directions:up, down,left, right.原创 2016-05-24 23:25:03 · 698 阅读 · 0 评论 -
leetcode-397. Integer Replacement
一、问题描述 Given a positive integer n and you can do operations as follow: If n is even, replace n with n/2.If n is odd, you can replace n with either n + 1 or n - 1. What is the minimum nu原创 2017-12-27 14:52:03 · 299 阅读 · 0 评论
分享