哪位大虾解决一下?

feng21 2007-03-21 06:59:24
How to write code to delete a specific node in a single link list (单链表)that takes O(1) time? That is, the time deleting a node is the same (independent from the length of the list.) Link list uses pointers,
not hash. Input includes a pointer to the head and a pointer to the node to delete. Show your algorithm with pseudo code. Hint: just 2 steps.
...全文
196 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
feng21 2007-03-21
  • 打赏
  • 举报
回复
How to calculate the execution time of a simple instruction “a=3” without writing a program?
feng21 2007-03-21
  • 打赏
  • 举报
回复
If class A needs to inform class B about an important event, what java/C++ technique can you use? A and B can be in the same thread, different threads, or different processes. List as many as you can.

1,265

社区成员

发帖
与我相关
我的任务
社区描述
软件工程/管理 管理版
社区管理员
  • 研发管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧