摘要:
There are N network nodes, labelled 1 to N. Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v 阅读全文
摘要:
Given a non-empty list of words, return the k most frequent elements. Your answer should be sorted by frequency from highest to lowest. If two words h 阅读全文
摘要:
You are given an integer array sorted in ascending order (may contain duplicates), you need to split them into several subsequences, where each subseq 阅读全文
摘要:
Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Venture Capital, LeetCode would like to work on some projects 阅读全文
摘要:
Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevation map, compute the volume of water it is able to 阅读全文
摘要:
#include #include class CArray { int size; int *ptr; public: CArray(int s = 0); CArray(CArray& a); ~CArray(); void push_back(int v); CArray& operator=(const CArray& a)... 阅读全文
摘要:
You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th 阅读全文
摘要:
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Example 阅读全文
摘要:
描述 魔兽世界的西面是红魔军的司令部,东面是蓝魔军的司令部。两个司令部之间是依次排列的若干城市。 红司令部,City 1,City 2,……,City n,蓝司令部两军的司令部都会制造武士。武士一共有 dragon 、ninja、iceman、lion、wolf 五种。每种武士都有编号、生命值、攻击 阅读全文
摘要:
A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you are give 阅读全文