由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - [合集] 两个经典面题
相关主题
a simple questionIf using C++, please avoid the use of STL for these questio (转载)
Perl求助Sort a stack without using auxiliary stacks or arrays
问个基本 C array 问题C++指针问题 int (*) [10]
求助:关于2个python的题目address of an array
Perl: How to return 2 dimention array pls ?a question of perl
请大虾验证!请问如何把初始化一个const 的vector (or array) in a class?
stack/heap corruptionqeustion about separation of interface and implementation in java
array allocation in chow to split function declaration and implementation in C#
相关话题的讨论汇总
话题: array话题: 第一列话题: 第一行话题: 面题话题: set
进入Programming版参与讨论
1 (共1页)
s*******e
发帖数: 664
1
☆─────────────────────────────────────☆
Dan916 (Dan) 于 (Thu Aug 13 12:27:53 2009, 美东) 提到:
(1)Implement 3 Stacks in one array.
怎样能充分利用空间, 即 cannot declare stack overflow unless the array is
completely full.
而且又avoid shifting.
网上查了查好像没什么方法能同时满足两个条件的??
(2)Given a 2-Dimensional(MXN) array if A[i][j]=1 Set all ith row and jth
column elements as '1'. linear running time, and constant space requirement.
这题应该是reuse第一行和第一列来记录哪行要变1了. 但如果是第一行或第一列里的任
何一个是1, last scan will just mess up the 1s recorded i
1 (共1页)
进入Programming版参与讨论
相关主题
how to split function declaration and implementation in C#Perl: How to return 2 dimention array pls ?
ask a question about compile shared library using libtool请大虾验证!
auto 很爽stack/heap corruption
int *a [] 和int (*a)[] 一样吗array allocation in c
a simple questionIf using C++, please avoid the use of STL for these questio (转载)
Perl求助Sort a stack without using auxiliary stacks or arrays
问个基本 C array 问题C++指针问题 int (*) [10]
求助:关于2个python的题目address of an array
相关话题的讨论汇总
话题: array话题: 第一列话题: 第一行话题: 面题话题: set