热文LeeCode : 451. Sort Characters By Frequency 按频率给字符排序
试题: Given a string, sort it in decreasing order based on the frequency of characters.
热文LeetCode : 455. Assign Cookies 分饼干
试题: Assume you are an awesome parent and want to give your children some cookies. But,
热文LeetCode : 69. Sqrt(x) 开方
试题: mplement int sqrt(int x). Compute and return the square root of x, where x is gua
热文LeetCode: Different Ways to Add Parentheses 给公式加括号
试题: Given a string of numbers and operators, return all possible results from computin
热文LeetCode : Longest Word in Dictionary through Deleting 字典中的最大串
试题: Given a string and a string dictionary, find the longest string in the dictionary
热文LeetCode: 345. Reverse Vowels of a String 反转字符串中元音字母
试题: Write a function that takes a string as input and reverse only the vowels of a str
热文LeetCode: 215. Kth Largest Element in an Array 数组中第k大元素
试题: Find the kth largest element in an unsorted array. Note that it is the kth largest
热文LeetCode: Sort Colors 三种颜色排序 多排序算法
试题: Given an array with n objects colored red, white or blue, sort them in-place so th
热文Linux多命令协作:管道、重定向
> 感谢Linuxcast,感谢苏勇(nash\_su)老师! 不要重复发明轮子 开源文化的核心理念之一就是不要重复发明轮子,很多的开源软件都是现有软件、代码、功能的重
热文LeetCode : 347. Top K Frequent Elements 根据频率选取topk元素
试题: Given a non-empty array of integers, return the k most frequent elements. Example
热文Hibernate中get()和load()方法有何区别?
1.get是立即加载,load是延时加载。 2.get会先查一级缓存,再查二级缓存,然后查数据库,load会先查一级缓存,若没找到,就创建代理对象,等需要的时候去查二级缓存和
热文LeetCode: Valid Palindrome II 字符串能否成回文
试题: Given a non-empty string s, you may delete at most one character. Judge whether yo
热文LeetCod: Merge Sorted Array 归并有序数组
试题: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sor
热文LeetCode: 141. Linked List Cycle 链表是否有环
试题: Given a linked list, determine if it has a cycle in it. To represent a cycle in t
热文LeetCode : Two Sum II - Input array is sorted 两个数求和
试题: Given an array of integers that is already sorted in ascending order, find two num
热文LeetCode : Sum of Square Numbers 两个数的平方和
试题: Given a non-negative integer c, your task is to decide whether there’re two intege
热文Java 中 HashMap 初始化时赋值
[来源][Link 1] 1、HashMap 初始化的文艺写法 HashMap 是一种常用的数据结构,一般用来做数据字典或者 Hash 查找的容器。普通青年一般会这
热文解决uWSGI listen queue of socket full
Wed Mar 13 10:23:18 2019 - uWSGI listen queue of socket "127.0.0.1:59861" (fd: 3) f
热文剑指offer:孩子们的游戏(圆圈中最后剩下的数)
试题: 每年六一儿童节,牛客都会准备一些小礼物去看望孤儿院的小朋友,今年亦是如此。HF作为牛客的资深元老,自然也准备了一些小游戏。其中,有个游戏是这样的:首先,让小朋友们围
热文剑指offer:扑克牌顺子
试题: LL今天心情特别好,因为他去买了一副扑克牌,发现里面居然有2个大王,2个小王(一副牌原本是54张\_)…他随机从中抽出了5张牌,想测测自己的手气,看看能不能抽到顺子
热文剑指offer:翻转单词顺序列
试题: 牛客最近来了一个新员工Fish,每天早晨总是会拿着一本英文杂志,写些句子在本子上。同事Cat对Fish写的内容颇感兴趣,有一天他向Fish借来翻看,但却读不懂它的意
热文剑指offer:左旋转字符串
试题: 汇编语言中有一种移位指令叫做循环左移(ROL),现在有个简单的任务,就是用字符串模拟这个指令的运算结果。对于一个给定的字符序列S,请你把其循环左移K位后的序列输出。
热文Spring中的Bean是线程安全的吗?
Spring容器中的Bean是否线程安全,容器本身并没有提供Bean的线程安全策略,因此可以说Spring容器中的Bean本身不具备线程安全的特性,但是具体还是要结合具体sco
热文剑指offer:字符流中第一个不重复的字符
试题: 请实现一个函数用来找出字符流中第一个只出现一次的字符。例如,当从字符流中只读出前两个字符"go"时,第一个只出现一次的字符是"g"。当从该字符流中读出前六个字符“g
热文剑指offer:数组中重复的数字
试题: 在一个长度为n的数组里的所有数字都在0到n-1的范围内。 数组中某些数字是重复的,但不知道有几个数字是重复的。也不知道每个数字重复几次。请找出数组中任意一个重复的数
热文剑指offer:把字符串转换成整数
试题: 将一个字符串转换成一个整数(实现Integer.valueOf(string)的功能,但是string不符合数字要求时返回0),要求不能使用字符串转换整数的库函数。
热文剑指offer:不用加减乘除做加法
试题: 写一个函数,求两个整数之和,要求在函数体内不得使用+、-、\、/四则运算符号。 代码: 加法有一下几个步骤: 1、计算相加后各个位置的值(不包括进位):
热文剑指offer:求1+2+3+...+n
试题: 求1+2+3+…+n,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。 代码: 1、由于
热文剑指offer:二叉树的下一个结点
试题: 给定一个二叉树和其中的一个结点,请找出中序遍历顺序的下一个结点并且返回。注意,树中的结点不仅包含左右子结点,同时包含指向父结点的指针。 代码: 这一题的题意
热文剑指offer:删除链表中重复的结点
试题: 在一个排序的链表中,存在重复的结点,请删除该链表中重复的结点,重复的结点不保留,返回链表头指针。 例如,链表1->2->3->3->4->4->5 处理后为 1->