摘要:
1. Problem一个字符串只能包含'(',')','{','}','['和']',判断字符串是否是闭合有效字符串。Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if... 阅读全文
摘要:
1. Problem一个字符串只能包含'(',')','{','}','['和']',判断字符串是否是闭合有效字符串。Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if... 阅读全文
摘要:
1. Problem去掉链表的倒数第n个节点,并返回链表头。一次遍历完成Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list... 阅读全文
摘要:
1. 几点认识:java中有两类线程:user thread(用户线程),daemon thread(守护线程)守护线程为其他线程的运行提供服务,例如GC线程(垃圾回收线程),内存管理线程。虚拟机判断程序执行结束的标准时不考虑守护线程:如果user thread全部撤离,daemon thread因... 阅读全文
摘要:
1. Question给定整型数组和target,找数组中的所有和为target的四个数,将其按值升序排列输出,输出结果不包含重复数对。Given an array S of n integers, are there elements a, b, c, and d in S such that a... 阅读全文
摘要:
1. Question给一个数字字符串,按照电话上各个数字对应的字母,返回该字符串代表的所有可能的字母组合。Given a digit string, return all possible letter combinations that the number could represent.A ... 阅读全文
摘要:
1. Question给定一个整型数组和key,找三个数,使其和与key最相近,返回这三个数的和。(假设至少会有一个解)Given an array S of n integers, find three integers in S such that the sum is closest to a... 阅读全文
摘要:
1. Question将excel表中的列标题(A、B、C...)转换为对应的列数字返回。Given a column title as appear in an Excel sheet, return its corresponding column number.For example: ... 阅读全文
摘要:
1. Question找数组中的大多数元素,即元素个数超过一般的那个元素Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ ... 阅读全文
摘要:
1. Question判断一个树是否是平衡二叉树(每个节点的两个子树深度差不超过1)Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is d... 阅读全文
摘要:
1. Question求二叉树的最大深度。Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node do... 阅读全文
|