Implement the following operations of a queue using stacks. push(x) — Push element x to the back …
分类:LeetCode题目解答
[LeetCode] Employee Importance 员工重要度
You are given a data structure of employee information, which includes the employee’s unique id, …
[LeetCode] Sum of Square Numbers 平方数之和
Given a non-negative integer c, your task is to decide whether there’re two integers a&…
[LeetCode] Subdomain Visit Count 子域名访问量统计
A website domain like “discuss.leetcode.com” consists of various subdomains. At the top lev…
[Leetcode] Peeking Iterator 瞥一眼迭代器
Peeking Iterator Given an Iterator class interface with methods: next() and hasNext(), design and implement a …
[Leetcode] Minimum Window Substring 最小字符串窗口
Minimum Window Substring Given a string S and a string T, find the minimum window in S which will contain all …
134. Gas Station
欢迎fork and star:Nowcoder-Repository-github 134. Gas Station 题目 There are N gas stations along a circular route…
LeetCode | Convert Sorted Array to Binary Search Tree
题目: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 思路: 自顶向下…
LeetCode 238 Product of Array Except Self
题目描述 Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to…
268. Missing Number
Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the…
[LeetCode] Read N Characters Given Read4 II - Call multiple times 用Read4来读取N个字符之二 - 多次调用
The API: int read4(char *buf) reads 4 characters at a time from a file. The return value is the actual …
[LeetCode] Palindrome Permutation 回文全排列
Given a string, determine if a permutation of the string could form a palindrome. For example,"code"&nb…