摘要:
Given an array containingndistinct numbers taken from0, 1, 2, ..., n, find the one that is missing from the array.For example,Givennums=[0, 1, 3]retur... 阅读全文
摘要:
首先是C++提供的四种转型操作:1. const_cast:常量性的转除。2. dynamic_cast:安全的向derived class进行转型,可能会带来很高的开销3. reinterpret_cast:低级转型,例如可讲pointer转成int,不建议使用4. static_cast: 强迫... 阅读全文
摘要:
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number ... 阅读全文
摘要:
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文