use STL map<> is works, but I recommended the unordered_map<> it is in
C++11 standard implement by hashing, you can try.
On Sat, Aug 11, 2012 at 5:49 AM, tendua wrote:
>
> If nodes are numbered then simply make a boolean array and make the
> corresponding element true after visiting the node. If
If nodes are numbered then simply make a boolean array and make the
corresponding element true after visiting the node. If nodes are string
then go for hashing. In Java you can use HashMap otherwise it'll take a
little more effort to implement it.
--
You received this message because you are
@shiv, your code is correct go compute the base 26 number. However, this
question is not base 26 number obviously.
On Wed, Aug 8, 2012 at 4:46 AM, shiv narayan wrote:
> this is similar to conversion of no in base 26.( where digits are
> a,b,c,d...z) just think it like decimal to binary conversi
def long_continuous_seq(A):
ls = {}
result = (0,0)
for x in A:
if not x in ls:
left = ls[x - 1] if (x - 1) in ls else 0
right = ls[x + 1] if (x + 1) in ls else 0
if left + right + 1 > result[1] - result[0]:
result = (x - left,
A data cache needs to be implemented for the top 100 data items selected
based on their frequency of access.
The most frequent data member must be accessed fastest. And the access
time/iterations of each data member from the cache should correspond to the
frequncy of its access.
Please choose the
Somebody from DCE plz tell the paper pattern of google...
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/BjLRVjRlekIJ.
To post to this group, send email to