自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(35)
  • 资源 (1)
  • 收藏
  • 关注

原创 JavaSwing订餐管理系统

本系统主要采用Java开发技术,运用MyEclipse开发工具,并且采用了MySQL来作为系统的配套数据库,从而使得系统的稳定性、健壮性及维护的方便有了较大的保障。

2022-08-19 01:50:22 1773 2

原创 Cryptography (COMP3223)

Exercise 1: Alice and Bob want to communicate using the RSA cryptosystem. To do so, Alice chooses two large prime numbers p, q and computes the modulus n = pq.a) Let ϕ(n) be Euler’s totient function, i.e. ϕ(n) returns the number of elements in the multipli

2022-06-23 21:37:46 120 1

原创 Software Architecture

SummaryIn this assignment, you will demonstrate your ability to understand and subsequently communicate the architecture of an existing software project. 1. First, you need to choose a suitable open source software project. The project

2022-06-23 21:34:20 121

原创 CSI2132: Databases IAssignment

QQ: 942371102Exercise 1 (30%)Consider the table below showing a sample dentist/patient appointment data. A patient is given an appointment at a specific time and date with a dentist located at a particular surgery. On each day of patient appointments, a de

2022-06-23 21:27:09 290

原创 证明题 8.20

问题描述:在一个无向图G=(V,E)中,我们称D属于V为一个占优集,是值每个v属于V都属于D或与D中一个节点为邻。在占优集问题中,输入为一个图和预算b,目标是求图的一个规模不超过b的控制集----如果该集存在。证明该问题是NP-完全的。答案:可以将顶点覆盖问题归约到支配集问题。若要在图 G(V,E) 中求得不大于b 的一个 顶点覆盖,可以先对图G 做一个预处理:对每条边(u,v) ∈E

2017-07-05 14:26:35 273

原创 111. Minimum Depth of Binary Tree

问题描述;Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.解题思路:直接求最短路径就是左右子树depth相比

2017-06-28 17:59:55 188

原创 112. Path Sum

问题描述:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example:Given the below binary tree an

2017-06-28 17:47:31 223

原创 114. Flatten Binary Tree to Linked List

问题描述:Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened tree should look like:

2017-06-28 17:33:32 134

原创 129. Sum Root to Leaf Numbers

问题描述:Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents the number123.Find the

2017-06-28 17:20:28 136

原创 240. Search a 2D Matrix II

问题描述:Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted in ascending from left to right.Int

2017-06-28 17:10:51 153

原创 455. Assign Cookies

问题描述:Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi, which is the minimum size

2017-06-28 17:03:34 180

原创 513. Find Bottom Left Tree Value

问题描述:Given a binary tree, find the leftmost value in the last row of the tree.Example 1:Input: 2 / \ 1 3Output:1Example 2: Input: 1 / \ 2 3

2017-06-28 16:52:38 120

原创 515. Find Largest Value in Each Tree Row

问题描述:You need to find the largest value in each row of a binary tree.Example:Input: 1 / \ 3 2 / \ \ 5 3 9 Output: [1, 3, 9]解题思路:由于是

2017-06-28 16:48:34 136

原创 107. Binary Tree Level Order Traversal II

问题描述: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

2017-06-28 12:08:30 148

原创 104. Maximum Depth of Binary Tree

问题描述:Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.解题思路:给定一棵二叉树,求大的深度。顾名思义,d

2017-06-28 11:39:08 210

原创 102. 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,null,null,15,7], 3 / \

2017-06-28 11:33:24 128

原创 101. Symmetric Tree

问题描述: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

2017-06-28 11:29:35 130

原创 100. Same Tree

问题描述:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.解

2017-06-28 11:25:20 135

原创 98. Validate Binary Search Tree

问题描述:Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node'

2017-06-28 11:18:47 135

原创 55. Jump Game

问题描述:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Dete

2017-06-28 11:00:23 144

原创 53. Maximum Subarray

问题描述:Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4],the contiguous subarray [4,-1,

2017-06-28 10:44:45 115

原创 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 NA P

2017-06-14 21:55:41 140

原创 5. Longest Palindromic Substring

问题描述:Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example: Input: "babad"Output: "bab"Note: "aba" is also a valid an

2017-06-14 18:14:28 121

原创 2. Add Two Numbers

问题描述:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and

2017-06-14 13:12:54 115

原创 448. Find All Numbers Disappeared in an Array

问题描述:Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this arr

2017-06-07 20:51:18 309

原创 3. Longest Substring Without Repeating Characters

问题描述:Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is

2017-06-05 20:48:19 131

原创 53. Maximum Subarray

问题描述:Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4],the contiguous subarray [4,-1,

2017-06-02 17:01:53 175

原创 215. Kth Largest Element in an Array

问题描述:Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,Given [3,2,1,5,6,4] and k = 2, r

2017-06-02 15:35:35 151

原创 169. Majority Element

问题描述:Given an array of size n, find the majority element. The majority element is the element that appearsmore than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority el

2017-06-01 19:04:14 118

原创 240. Search a 2D Matrix II

问题描述:Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted in ascending from left to right.Integ

2017-05-31 23:05:41 143

原创 5. Longest Palindromic Substring

题  目:Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example: Input: "babad"Output: "bab"Note: "aba" is also a valid answ

2017-03-26 14:43:31 152

原创 15. 3Sum

题  目:Given an array S of n integers, are there elements a,b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The solution set must not con

2017-03-17 17:49:05 137

原创 96. Unique Binary Search Trees

题  目:Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's:   1        3   3     2     1   

2017-03-17 13:27:50 147

原创 50. Pow(x, n)

题  目:50. Pow(x,n)   Implement pow(x,n).思  路:pow(x,n) 可以看作是n*(n-1)!,故可使用递归算法:1.1的阶乘是1,对于任意的x来说,power(x,0)是1,2.大于1的数的阶乘是n乘n-1的阶乘,power(x,n)是power(x,n-1)乘以x的结果。def pow(x,n):    if n==0:       

2017-03-15 22:39:05 225

转载 Given an input string, reverse the string word by word.

老师,由于账号更改,这是我的第一题,,转载回来。

2017-03-15 22:33:37 596

fish-master.zip

300行捕鱼达人java jpanel写的

2021-09-18

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除