佛奴儿
佛奴儿
全部文章
分类
未归档(985)
归档
标签
去牛客网
登录
/
注册
Roni
ACMer
TA的专栏
0篇文章
0人订阅
职场那些事儿
0篇文章
0人学习
全部文章
(共985篇)
680. Valid Palindrome II【Easy】【双指针-可以删除一个字符,判断是否能构成回文字符串】
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Input: "aba" ...
2019-02-24
0
538
345. Reverse Vowels of a String【Easy】【双指针-反转字符串中的元音字符】
Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Input: "hello" Output: "holle&q...
2019-02-24
0
347
633. Sum of Square Numbers【Easy】【双指针-是否存在两个数的平方和等于给定目标值】
Given a non-negative integer c, your task is to decide whether there're two integers a and bsuch that a2 + b2 = c. Example 1: Input: 5 Output: T...
2019-02-24
0
439
167. Two Sum II - Input array is sorted【Easy】【双指针-有序数组求两数之和为目标值的下标】
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The functio...
2019-02-24
0
525
两个线程交替打印奇偶数【Lock版】
import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class Solution { private int start = 1;...
2019-02-22
0
474
Java并发编程实战笔记
如果当多个线程访问同一个可变的状态变量时没有使用合适的同步,那么程序就会出现错误。有三种方式可以修复这个问题: i、不在线程之间共享该状态变量 ii、将状态变量修改为不可变的变量 iii、在访问状态变量时使用同步 什么是线程安全性? A:我们可以将单线程的正确性近似定义为“所见即...
2019-02-21
0
452
HashMap底层数据结构和算法解析
1.Hash Map的数据结构? A:哈希表结构(链表散列:数组+链表)实现,结合数组和链表的优点。当链表长度超过8时,链表转换为红黑树。 transient Node<K,V>[] table; 2.HashMap的工作原理 A:HashMap底层是hash数组和单...
2019-02-20
0
492
经典算法-最长公共子序列(LCS)与最长公共子串(DP)
public static int lcs(String str1, String str2) { int len1 = str1.length(); int len2 = str2.length(); int c[][] = new int[l...
2019-02-18
0
503
Java成神之路-进阶步骤(转)
https://www.hollischuang.com/archives/3280 一、基础篇 面向对象 什么是面向对象 面向对象、面向过程 面向对象的三大基本特征和五大基本原则 平台无关性 Java如何实现的平台无关 JVM还支持哪些语言(Kotlin、Groovy、JRuby、...
2019-02-18
0
594
秒杀系统架构优化思路
一.秒杀场景与其他场景比较 1)im系统,例如qq或微博,每个人都读自己的数据(好友列表、群列表、个人信息) 2)微博系统,每个人读你关注的人的数据,一个人读多个人的数据 3)秒杀系统,库存只有一份,所有人都会在集中的时间读和写这些数据,多个人读一个数据 例如:小米手机每周二秒杀,可能...
2019-02-17
0
584
首页
上一页
7
8
9
10
11
12
13
14
15
16
下一页
末页