Given a list of non negative integers, arrange them such that they form the largest number. Example 1: Input: …
分类:LeetCode
LeetCode | Single Number(数组中的单个数字)
Given an array of integers, every element appears twice except for one. Find that single one. Note: …
LeetCode Question 2
Question 2 You are given two non-empty linked lists representing two non-negative integers. The digits are sto…
[LeetCode][Python]27. Remove Element
Given an array and a value, remove all instances of that value in place and return the new length. Do not allo…
804. Unique Morse Code Words
题目网址:https://leetcode.com/problems/unique-morse-code-words/description/ 大意:求一个数组里面的字母所翻译的摩尔斯电码具体有多少种(难道莫尔斯电码的重…
Leetcode - 刷题总结3
second round leetcode 57, Insert Interval (Done) /** * Definition for an interval. * public class Interval { *…
143. Reorder List
欢迎fork and star:Nowcoder-Repository-github 143. Reorder List 题目: Given a singly linked list L: L0→L1→…→Ln-1→Ln…
[LeetCode] Global and Local Inversions 全局与局部的倒置
We have some permutation A of [0, 1, ..., N - 1], where N is the length of&nbs…
LeetCode | Longest Common Prefix
题目: Write a function to find the longest common prefix string amongst an array of strings. 思路: 首先找出所有字符串的最小长度。…
LeetCode | Construct Binary Tree from Preorder and Inorder Traversal
Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicate…
LeetCode算法题-Employee Importance(Java实现)
这是悦乐书的第291次更新,第309篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第159题(顺位题号是690)。定义员工信息的数据结构,其中包括员工的唯一ID,他的重要性值以及他的直接下属…
2018-06-04 682. Baseball Game
题意:给你一个字符串序列,每个字符串代表不同的意思,最后算出得分。 解题思路:使用一个栈存放所有有效的得分,遇到表示无效得分的字符串,总分减去栈顶元素,把栈顶元素弹出。 class Solution { public: …