Cracking the coding interview_Technical questions

1. What you need to know

MUST-HAVE KNOWLEDGE

data structures:

linked lists

tree, tries&graphs

stacks&queues

heaps

arraylists

hash tables

algorithms:

breadth-first search

depth-first search

binary search

merge sort

quick sort

concepts:

bit manipulation

memory(stack vs heap)

recursion

dynamic programming

Big O Time & Space

2. Walking through a problem

1.Listen (pay very close attention to any information in the problem description)

2.Example (special case)

3.Brute force (a naïve algorithm and its runtime), then optimize(do not code)

4.Optimize (use BUD optimization-bottlenecks/unnecessary work/duplicated work)

  •  Look for any unused info
  • Solve it manually
  • Solve it and then think about why the algorithm fails
  •  Make a time & space tradeoff

5.Walk through your approach in detail

6.Implement (write beautiful code)

7.Test, test in this order: (find bugs and fix them)

  •  Conceptual test
  • Unusual & non-standard code
  • Hot spots, like arithmetic and null nodes
  • Small test cases
  • Special cases and edge cases

 

转载于:https://www.cnblogs.com/cecilia-xu/articles/10261827.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值