Size: 560 bytes.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
// cs/q/search_big_array/search_big_array.h
#ifndef CS_Q_SEARCH_BIG_ARRAY_SEARCH_BIG_ARRAY_H
#define CS_Q_SEARCH_BIG_ARRAY_SEARCH_BIG_ARRAY_H

// Searches a strictly ascending stream numbers.
// Returns the index where the target was found, or -1 if
// the target was not found.
int Search(int target);
// Sets the stream used by ArrayReaderGet to an array value.
void InitArrayReader(int* nums, int length);
// Gets the value at a particular index, or INT_MAX
// (2147483647)
int ArrayReaderGet(int index);

#endif  // CS_Q_SEARCH_BIG_ARRAY_SEARCH_BIG_ARRAY_H
v0 (commit) © 2025 @p13i.io | Load balancer proxied to: cs-code-viewer-3:8080 in 4ms.