
算法题目
文章平均质量分 77
csm201314
中大软院小生,菜鸟一个
展开
-
[每日算法] leetcode第179题 Largest Number
原题目描述Given a list of non negative integers, arrange them such that they form the largest number.Example 1: Input: [10,2] Output: “210” Example 2: Input: [3,30,34,5,9] Note: The result ma...原创 2018-09-08 09:27:40 · 3248 阅读 · 0 评论 -
[每日算法] leetcode第169题Majority Element 和 第229题Majority Element II
169.Majority Element原题目描述Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and...原创 2018-12-10 00:05:22 · 212 阅读 · 0 评论 -
[每日算法] leetcode第72题 Edit Distance
题目描述给定两个字符串word1, word2。求出从word1到word2步骤最少的修改方式,修改方式包括替换(replace),插入(insert),删除(delete)。replace: “replace” -> “eeplace”insert: “insert” -> “iinsert”delete: “delete” ->“elete”解题思路我们使用一个二...原创 2018-12-09 23:46:52 · 232 阅读 · 0 评论 -
[每日算法] leetcode第115题 Distinct Subsequence 和 第321题 Create Maximum Number
115. Distinct Subsequence原题目描述Given a string S and a string T, count the number of distinct subsequences of S which equals T.A subsequence of a string is a new string which is formed from the origi...原创 2018-11-18 22:24:48 · 234 阅读 · 0 评论 -
[每日算法] leetcode第221题 Maximal Square
原题目描述Given a 2D binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and return its area.Example:Input: 1 0 1 0 01 0 1 1 11 1 1 1 11 0 0 1 0Output: 4题目大意题干清...原创 2018-11-11 17:09:41 · 414 阅读 · 0 评论 -
[每日算法] leetcode第198题 House Robber 和 第213题 House Robber II
198. House Robber原题目描述You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of the...原创 2018-11-04 10:46:19 · 355 阅读 · 0 评论 -
[每日算法] leetcode第345题 Reverse Vowels of a String
345 Reverse Vowels of a String原题目描述Write a function that takes a string as input and reverse only the vowels of a string.Example 1: Input: "hello" Output: "holle"Example 2: Input: "le...原创 2018-10-27 23:32:51 · 329 阅读 · 0 评论 -
[每日算法] leetcode第112题 Triangle
112 Triangle原题目描述Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], ...原创 2018-10-21 20:10:07 · 347 阅读 · 0 评论 -
[每日算法] leetcode第113题 Path Sum II
原题目描述Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum.Note: A leaf is a node with no children.Example:Given the below binary tree and sum = 22,...原创 2018-09-30 15:31:59 · 2921 阅读 · 0 评论 -
[每日算法] leetcode第24题 Swap Nodes in Pairs、第 111题 Minimum Depth of Binary Tree
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....原创 2018-10-14 11:00:01 · 729 阅读 · 0 评论 -
[每日算法] leetcode第151题 Reverse Words in a String
原题目描述Given an input string, reverse the string word by word.Example:Input: “the sky is blue”,Output: “blue is sky the”.Note:A word is defined as a sequence of non-space characters. Input stri...原创 2018-09-23 01:28:16 · 3504 阅读 · 0 评论 -
[每日算法] leetcode第62题 Unique Paths
原题目描述A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach t...原创 2018-10-04 00:40:38 · 3185 阅读 · 0 评论 -
[每日算法] leetcode第31题 Next Permutation
原题目描述 Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the low...原创 2018-09-16 10:39:07 · 3737 阅读 · 0 评论 -
算法project实验报告
中山大学数据科学与计算机学院本科生实验报告(2018年秋季学期)课程名称算法设计与分析任课老师张子臻年级2016级专业(方向)计算机应用学号16340030姓名陈斯敏电话15917173057Email2540740154@qq.com开始日期2018.12.18完成日期2018.12.22实验问题描述Capacita...原创 2018-12-23 13:02:33 · 1810 阅读 · 0 评论