摘要:一、邮件格式 Hi Jack, (打招呼,用Hi就可以) Could you please help to create user IDs with below info? (礼貌用语,could you please....) Thank you for your help. (致谢) Best
阅读全文
摘要:如何发起一段对话? 1 Hi. 见面打招呼使用Hi就显得比较随和,也不失正式。 2 How are you today?或 How is it going? 3 Fine. What about you? 你呢 4 Where are you from? 你来自哪里的最地道的表述。 5 I am C
阅读全文
摘要:题目:Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 解析:合并k个已经有序的单链表,使其最终成为一个有序的单链表。原理就是归并排序,递归运算。基本算
阅读全文
摘要:题目:Sort a linked list in O(n log n) time using constant space complexity. 分析:给单链表排序,要求时间复杂度是O(nlogn),空间复杂度是O(1)。时间复杂度为O(nlogn)的排序算法有快速排序和归并排序, 但是,对于单链
阅读全文
摘要:题目: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 分析:合
阅读全文
摘要:题目: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. 解析:同求全部组合的过程一样,只是这里限制每个组合中元素的个数为k,求所有组合时并不限制元素个数。 若要排除重复
阅读全文
摘要:题目: Shuffle a set of numbers without duplicates. 分析: 对一组不包含重复元素的数组进行随机重排,reset方法返回最原始的数组,shuffle方法随机返回数组的一个排列, 并且使得获得数组每一个排列的概率都是相同的。为此,可以在初始化时,求出数组的所
阅读全文
摘要:题目: You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element fro
阅读全文
摘要:题目: Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Example: 分析:采用
阅读全文
摘要:1 在各自最优的条件下,下面哪些算法性能最优(B) A 快速排序 B 冒泡排序 C 直接插入排序 D 简单选择排序 2 设计分布式写文件,读文件,并编程实现。 3 java多线程编程(淘宝 买家付款给中间账户,在买家确认收货后,中间账户再转账给卖家)淘宝每天有10万笔这样的交易,请用多线程实现。 4
阅读全文