![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Algorithms&Interview Questions
文章平均质量分 57
tanglinghui
Master student in SUNY Buffalo, Dept of Computer Science.
展开
-
数组,字符串相关面试题
所有的题目均采自于careercup, cracking the code interview等网站、书籍。1. In an unsorted array of first N natural numbers. The array contains a number which is duplicated and one is missing. Find both the numbers. 一原创 2012-05-30 00:14:16 · 1078 阅读 · 0 评论 -
常见链表面试题
简单LinkedList 的java代码实现:public class LinkedListNode { public int value; public LinkedListNode next; public LinkedListNode(int value) { this.value = value; this.next = null; }}public cla原创 2012-05-30 23:31:42 · 3659 阅读 · 0 评论 -
常见栈、队列面试题
这篇文章里的题目均整理于Cracking the Code Interview 2nd Edition。栈和队列一般不会在面试题里面单独做为一整个题出现,往往都是作为一种辅助的数据结构,利用栈和队列的性质去解决某一类题目。栈Stack的特点,先进后出,LIFO。栈的基本操作:push压栈,pop出栈,peek返回栈顶元素但栈不变化。栈和队列里的元素实现 in Java,这里用到的范原创 2012-06-06 23:39:57 · 5454 阅读 · 1 评论 -
树和图
树和图是面试当中最常考的内容之一。几个要点:1. 树,二叉树Binary Tree,二叉搜索树Binary Seach Tree,定义。2. 二叉树的几种遍历:前序preOrder,中序inOrder,和后序postOrder,层次遍历。其中层次遍历非常的重要,很多公司都喜欢考,其实就是图的广度优先搜索Breath First Search。3. 图的表示:临接表和临接矩阵。4原创 2012-06-17 16:55:57 · 4402 阅读 · 0 评论 -
常用排序、选择算法
1 插入排序插入排序的左边是有序的,依次从右边拿出一个数,插入到左边,直到右边没有更多的数,此时左边的数已经全部按序排列。插入排序的C语言实现 void insertion_sort(int array[], int length){ int i,j; for(i=1;i<length;i++){ for(j=i;j>0;j--){ if(array[j]<arr原创 2012-05-30 11:10:06 · 1153 阅读 · 0 评论