常见算法笔试或面试题(国外英语资料).docVIP

  • 35
  • 0
  • 约1.73万字
  • 约 23页
  • 2017-06-23 发布于河南
  • 举报

常见算法笔试或面试题(国外英语资料).doc

常见算法笔试或面试题(国外英语资料)

常见算法笔试或面试题(国外英语资料) Zhenjings tech blog Form a literary circle Common algorithms written or interview questions 2010-10-18 10:12 by Zhenjing, 4714 visits, fanchon, collection, editing Problem 1: Is, it, a, loop? Assume that wehave a head pointer to a link-list. Also assumethat we know the list is single-linked. Can you come up an algorithm to checkwhether this link list includes a loop by using O (n) time and O (1) space wheren is the length of the list Furthermore can you do? So with O (n) time and onlyone register? Methods: use two pointers, start from scratch, move one node at a time, one fo

文档评论(0)

1亿VIP精品文档

相关文档