发布了文章2020-05-24
Table of Contents 1. Require 2. Run 2.1 Docker(Recommend) 2.2 Shell 2.3 Load Sample Data 3. REST 4. Benefits of Rest 5. Unified Response Structure 6. Unified Exception Handling 7. Unified Query Model, Response Model and DataBaseModel 7.1 This Proj...
发布了文章2019-12-29
You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a separate doubly linked list. These child lists may have one or more children of their own, and s...
发布了文章2019-12-28
Given an n-ary tree, return the level order traversal of its nodes' values.
发布了文章2019-11-30
Given a string s that consists of only uppercase English letters, you can perform at most k operations on that string.
发布了文章2019-11-30
Given a non-empty string containing an out-of-order English representation of digits 0-9, output the digits in ascending order.
发布了文章2019-11-16
Given an 2D board, count how many battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. You may assume the following rules:You receive a valid board, made of only battleships or empty slots.Battle...
发布了文章2019-11-02
Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" touches the left and top edges of the matrix and the "Atlantic ocean" touches the right and bottom edges.
发布了文章2019-10-26
Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal.
发布了文章2019-10-14
Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2.
发布了文章2019-10-13
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n).
发布了文章2019-10-13
A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same.
发布了文章2019-10-05
Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algorithm to minimize the largest sum among these m subarrays.
发布了文章2019-09-14
Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used.
发布了文章2019-09-14
There are two left leaves in the binary tree, with values 9 and 15 respectively. Return 24.
发布了文章2019-09-08
A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can jump on a stone, but it must not jump into the water.
发布了文章2019-09-07
Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible.
发布了文章2019-09-05
A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59).
发布了文章2019-09-02
Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...
发布了文章2019-08-31
Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target number must exist in the array.
发布了文章2019-08-29
If n is even, replace n with n/2.If n is odd, you can replace n with either n + 1 or n - 1.What is the minimum number of replacements needed for n to become 1?