leetcode算法题解(Java版)-6-链表,字符串
一、字符串处理 题目描述 Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 思路 把数字转化为罗马符号,根据罗马符号的规律,可以先用map来存储一下。之后把每一位添加到所求中去。 语法点:StringBuffer是字符缓冲区,是可.....
leetcode算法题解(Java版)-5-简单模拟,字符串处理
一、简单贪心 题目描述 Given n non-negative integers a1 , a2 , ..., an , where each represents a point at coordinate (i, ai ). n vertical lines are drawn such that the two endpoints of line i is at (i, ai ) and....
leetcode算法题解(Java版)-4-动态规划(杨辉三角问题)
一、简单模拟 题目描述 Say you have an array for which the i th element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you like ....
leetcode算法题解(Java版)-3-广搜+HashMap
一、运算符——异或"^" 题目描述 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it w.....
leetcode算法题解(Java版)-2-最长回文子串
一、int数字反转 题目描述Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 思路: 题目很简单,需要注意的是:int型是32位的。1000000003 反转后就超了!所以需要包装类Integer中的最大值和最小值 小技巧:为了实现反转,可以先把符号保存到flag.....
leetcode算法题解(Java版)-1-二叉树遍历
又开始刷算法题了,正好在学Java,顺便也练练Java。 题目描述 Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate betwe....
【LeetCode-面试算法经典-Java实现】【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. 题目大意 给定一棵两叉树求树的最小深度。...
Leetcode 461. Hamming Distance JAVA语言
The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calculate the Hamming distance....
Leetcode 463. Island Perimeter JAVA语言
You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely....

Leetcode 371. Sum of Two Integers JAVA语言
1 2 3 Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。
LeetCode java相关内容
LeetCode您可能感兴趣
- LeetCode go语言
- LeetCode电话号码
- LeetCode力扣
- LeetCode路径
- LeetCode解析
- LeetCode字母
- LeetCode二叉树
- LeetCode温度
- LeetCode结构
- LeetCode bst
- LeetCode刷题
- LeetCode算法
- LeetCode链表
- LeetCode数组
- LeetCode字符串
- LeetCode python
- LeetCode元素
- LeetCode offer
- LeetCode面试
- LeetCode代码
- LeetCode单词
- LeetCode排序
- LeetCode实战
- LeetCode tree
- LeetCode算法解析
- LeetCode栈
- LeetCode有序数组
- LeetCode节点
- LeetCode golang
- LeetCode二叉搜索树
算法编程
开发者社区在线编程频道官方技术圈。包含算法资源更新,周赛动态,每日一题互动。
+关注