
算法
威廉汉森
这个作者很懒,什么都没留下…
展开
-
leetcode 42
42. Trapping Rain Water题目描述Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given原创 2017-03-15 11:05:18 · 535 阅读 · 0 评论 -
leetcode 135
135. Candy题目描述There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at l原创 2017-03-15 11:26:20 · 319 阅读 · 0 评论 -
LeetCode 57
57. Insert Interval题目描述Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to th原创 2017-03-16 13:43:32 · 310 阅读 · 0 评论 -
java 多线程题目
1.给定两个线程,怎么让第一个线程打印12,然后让第二个线程打印A,然后线程打印34B依次56C往后递推代码:/** * Created by hanson on 2019/4/25. */public class ThreadRankPrint { public static void main(String args[]) { PrintObject pri...原创 2019-04-27 13:30:12 · 613 阅读 · 1 评论 -
关于秒杀架构的思考
秒杀构架到如今是一个很常见的业务场景,多数情况要考虑到瞬时的流量峰值不至于压垮系统,但同时又要保证整个业务系统的可用性,许多大公司在面试的时候也会问到关于秒杀的问题。秒杀场景的业务场景包括:价格比较优惠推广效果比较好在短时间内顺时将商品售空技术需求分析重点考虑以下几点:关于商品的超买超卖的问题订单持久化,高并发情况下数据写入的一致性问题如果在高并发的情况下解决系统负载问题针...原创 2019-04-27 13:41:02 · 232 阅读 · 0 评论