注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
一个日本鬼子
头一次和鬼子面对面
题目是 find all pairs in a integer array, pair sum == target value,target is integer, each element can be used at most once.
input array [1,2,1,2,3] target 3
output : [1,2][1,2]
My solution is O(n) time and space with a map<element, index list>
Follow up is then the input array too big to be consumed in memory how to handle it?
m您好! 本帖隐藏的内容需要积分高于 188 才可浏览 您当前积分为 0。 使用VIP即刻解锁阅读权限或查看其他获取积分的方式 游客,您好! 本帖隐藏的内容需要积分高于 188 才可浏览 您当前积分为 0。 VIP即刻解锁阅读权限 或 查看其他获取积分的方式
不明不白的 不知道 another candidate比我好在哪里
不知道我的solution不是不不够好???? 是能有更好的solution? 求教
|