清单程序员修身

Data Structures

   1. Integer
      – find number of 1s
      – next largest smaller
      – smallest larger number
      – determine if is palindrom
      – itoa, atoi
      – add 2 numbers w/o using + or arithmetic operators
      – implement *, -, / using only +
      – find max of two numbers w/o comparison
      – swap two numbers with +/-
      – swap two numbers with ^
      – given an integer, find the closest number that is palindrome
      – implement putlong() by putchar()
   2. Bit array
   3. Linked list
      – find cycle,
      – find position of cycle starts
      – reverse LL
      – delete a node in middle
      – each node contains a value pointer pointing to a node, 
        duplicate LL.
      – remove duplicates from sorted/un-sorted LL.
      – find n-th to last node to end
      – number is represented by LL, add 2 numbers
   4. Array
      – Longest common substring (LCSubstr)
      – Longest common subsequence (LCS).
      – Longest increasing subsequence (LIS).
      – Longest palingdrome in string.
      – array, elements are +/-, find subsequence of max sum
      – circular array, elements are +/-, find subsequence of max sum
      – find all pairs of integers add up to a sum
      – find all pairs of integers add up to a sum, 
        integers are +/- and sorted
      – find one missing number in N numbers in range [0, N]
      – find two missing number in N numbers in range [0, N].
      – binary search circular array
      – Given {a1, a2, a3, ..}, {b1, b2, b3, …}, 
        get {a1, b1, a2, b2, …}
      – Given 2 arrays A and B, A large enough to hold both, 
        merge B into A.
   5. String
      – KMP, Rabin-Karp, Boyer Moore
      – reverse string
      – reverse words in string  
      – strcpy, strcmp, strstr, atoi, itoa, strdup
      – remove duplicate characters in O(1) space
      – Given dictionary, transform one word to another of same length.
     

转载于:https://www.cnblogs.com/yxwkf/p/4791897.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值