Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1 = { 11, 12, 13, 14 } is 1 ...
分类:
其他好文 时间:
2019-12-08 15:24:56
阅读次数:
84
Design a data structure that supports the following two operations: void addWord(word) bool search(word) search(word) can search a literal word or a r ...
分类:
其他好文 时间:
2019-12-08 12:46:54
阅读次数:
66
原题链接在这里:https://leetcode.com/problems/swap-for-longest-repeated-character-substring/ 题目: Given a string text, we are allowed to swap two of the charac ...
分类:
其他好文 时间:
2019-12-08 10:58:19
阅读次数:
129
题目如下: Tic-tac-toe is played by two players A and B on a 3 x 3 grid. Here are the rules of Tic-Tac-Toe: Players take turns placing characters into empt ...
题目如下: Given two integers tomatoSlices and cheeseSlices. The ingredients of different burgers are as follows: Jumbo Burger: 4 tomato slices and 1 chees ...
分类:
其他好文 时间:
2019-12-08 10:38:57
阅读次数:
73
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes ...
分类:
其他好文 时间:
2019-12-08 01:34:55
阅读次数:
120
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia ...
分类:
其他好文 时间:
2019-12-08 00:58:19
阅读次数:
99
When the ES6 class shipped back in 2015, a number of additional keywords came with it. Two of these are constructor and super. Both of these are speci ...
分类:
编程语言 时间:
2019-12-08 00:47:28
阅读次数:
115
Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. ...
分类:
其他好文 时间:
2019-12-07 21:15:30
阅读次数:
99
Go语言操作Redis Redis介绍 Redis是一个开源的内存数据库,Redis提供了多种不同类型的数据结构,很多业务场景下的问题都可以很自然地映射到这些数据结构上。除此之外,通过复制、持久化和客户端分片等特性,我们可以很方便地将Redis扩展成一个能够包含数百GB数据、每秒处理上百万次请求的系 ...
分类:
编程语言 时间:
2019-12-07 11:03:46
阅读次数:
83