![](https://img-blog.csdnimg.cn/20190124185140158.jpeg?x-oss-process=image/resize,m_fixed,h_224,w_224)
数据结构与算法
基础数据结构与算法、LeetCode、ACM、趣味算法以及面试算法等
开发者如是说
这个作者很懒,什么都没留下…
展开
-
数据结构与算法回顾-2:排序算法小结
在下面的排序算法中会使用到的方法: protected static void exchange(Comparable[] arr, int fromPos, int toPos) { Comparable temp = arr[fromPos]; arr[fromPos] = arr[toPos]; arr[toPos] = temp; ...原创 2019-02-25 23:48:49 · 249 阅读 · 0 评论 -
数据结构与算法回顾-1:算法的度量和基本数据结构
1、数据结构数据结构是相互之间存在一种或多种关系的数据的集合。1.1 三要素数据结构三要素是:1.数据的逻辑结构;2.数据的物理结构;3.数据的运算。数据结构是相互之间存在一种或多种特定关系的数据元素的集合。1.1.1 逻辑结构分为线性结构和非线性结构,线性结构:线性表、栈、队列非线性结构:树、图、集合1.1.2 存储结构即物理结构,分四种(存储数据时不只要存储元素的值...原创 2019-02-25 23:33:04 · 257 阅读 · 0 评论 -
LeetCode-Easy-021-Merge Two Sorted Lists
描述Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->4, 1->3->4Output: 1-...原创 2019-01-25 00:58:25 · 557 阅读 · 0 评论 -
LeetCode-Easy-020-Valid Parentheses
描述Given a string containing just the characters ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same type of ...原创 2019-01-25 00:14:32 · 548 阅读 · 0 评论 -
LeetCode-Easy-014-Longest Common Prefix
描述Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string “”.Example 1:Input: ["flower","flow","flight"]Output: ...原创 2019-01-24 23:56:53 · 553 阅读 · 0 评论 -
LeetCode-Easy-013-Roman to Integer
描述Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D ...原创 2019-01-24 19:16:30 · 587 阅读 · 0 评论 -
LeetCode-Easy-009-Palindrome Number
描述Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.Example 1:Input: 121Output: trueExample 2:Input: -121Output: falseExplana...原创 2019-01-24 18:44:26 · 588 阅读 · 0 评论 -
LeetCode-Easy-007-Reverse-integer
描述Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are dealing wi...原创 2019-01-24 12:52:05 · 599 阅读 · 0 评论 -
LeetCode-Easy-001-Two sum
描述Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the sam...原创 2019-01-24 12:40:03 · 568 阅读 · 1 评论