登录
|
注册
公司
标签
文章
搜索
链表
热门公司
阿里巴巴
微软
腾讯
迅雷
华为
百度
热门职位
研发工程师
C语言工程师
所有
有回答
没回答
新题目
有最佳答案
排序
热度
·
时间
·
经典指数
1
0
1165
A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key and a Next pointer to the next structure. Now given a linked list, you are supposed to sort the structures according to their key values in increasing order. 输入描述: Each input file contains one test case. For each case, the first line contains a positive N (5) and an address of the head node, where N is the total number of nodes in memory and th ...
阅读题目
链表
排序
面试题
经典指数
0
0
1160
Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? ...
阅读题目
链表
面试题
经典指数
1
0
989
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. ...
阅读题目
链表
面试题
经典指数
0
0
936
Given a linked list, swap every two adjacent nodes and return its head. For example, Given1->2->3->4, you should return the list as2->1->4->3. Your algorithm should use only constant space. You may not modify the values in the list, only nodes itself can be changed. ...
阅读题目
链表
面试题
经典指数
1
0
4964
用不带头结点的单链表存储队列,其队头指针指向队头结点,队尾指针指向队尾结点,则在进行出队操作时() 仅修改队头指针 仅修改队尾指针 队头、队尾指针都可能要修改 队头、队尾指针都要修改 ...
阅读题目
链表
队列
单选题
经典指数
0
0
897
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy of the list. ...
阅读题目
链表
面试题
经典指数
1
0
4549
给定一个常数K以及一个单链表L,请编写程序将L中每K个结点反转。例如:给定L为1→2→3→4→5→6,K为3,则输出应该为 3→2→1→6→5→4;如果K为4,则输出应该为4→3→2→1→5→6,即最后不到K个元素不反转。 输入描述: 每个输入包含1个测试用例。每个测试用例第1行给出第1个结点的地址、结点总个数正整数N(5)、以及正整数K(子链结点的个数。结点的地址是5位非负整数,NULL地址用-1表示。接下来有N行,每行格式为:Address Data Next其中Address是结点地址,Data是该结点保存的整数数据,Next是下一结点的地址。 输出描述: 对每个测试用例,顺序输出反转后的链表,其上每个结点占一行,格式与输入相同。 输入例子: 00100 6 400000 4 9999900100 1 1230968237 6 -133218 3 0000099999 5 6823712309 2 33218 输出例子: 00000 4 3321833218 3 1230912309 2 0010000100 1 9999999999 5 6823768237 ...
阅读题目
数组
链表
面试题
经典指数
1
0
13359
在单链表中,要将s所指结点插入到p所指结点之后,其语句应为() s->next=p+1; p->next=s; (*p).next=s; (*s).next=(*p).next s->next=p->next; p->next=s->next; s->next=p->next; p->next=s; ...
阅读题目
链表
单选题
经典指数
1
0
4170
已知广义表LS=((a,b,c),(d,e,f)),运用head和tail函数取出LS中原子e的运算是( )。 head(tail(head(tail(LS))) head(tail(LS)) head(tail(tail(head(LS)))) tail(head(LS)) ...
阅读题目
C语言工程师
链表
单选题
经典指数
0
0
7324
下列给定程序中,函数fun的功能是:计算一个带头结点的单向链表中各节点的数据据域中数值之和,结果作为函数值返回。 请在程序的下画线处填入正确的内容并将下画线删除,使程序得出正确的结果。 #define N 8 typedef struct list { int data; struct list *next; } SLIST; SLIST *creatlist(int *); void outlist(SLIST *); int fun( SLIST *h) { SLIST *p; int s = 0; p = h->next; while (p) { /**********found**********/ s += p-> 1 ; /**********found**********/ p = p-> 2 ; } return s; } main( ) { SLIST *head; ...
阅读题目
C语言工程师
链表
填空题
经典指数
<<
<
1
2
3
4
5
6
>
>>
249
题目数
1
贡献者
212
答案数
扫描后移动端查看
我也分享一个题目
相关标签
数组
阿里巴巴
研发工程师
队列
C语言工程师
栈
复杂度
树
哈希
2015
同类标签
树
排序
数组
字符串
复杂度
查找
栈
图
哈希
队列
微信公众号
欢迎加入,一起群聊
×
登录
注册
找回密码
记住登录
登录
快速注册
直接第三方登录