@Neeraj:
Your approach is good, this however lists .999.999.999 which is
not a valid IP address.
grep -lR [0-255]\.[0-255]\.[0-255]\.[0-255] *
further filter out the output of above to invalidate any ip address
that are reserved.
-l is for suppressing normal output and printing only
Sorry this doesn't work all grep out there ...
On 22 Sep, 01:40, Prem Mallappa prem.malla...@gmail.com wrote:
@Neeraj:
Your approach is good, this however lists .999.999.999 which is
not a valid IP address.
grep -lR [0-255]\.[0-255]\.[0-255]\.[0-255] *
further filter out the output
information is available on Internet,
- Wikipedia is a ocean of knowledge.
- Google.com
- Numerical recipies in C ( I think it has some reference to Brents
algo)
Not sure about this algo's applications in detection of loops in
linked list.
On 18 Aug, 04:42, jayapriya surendran
On 13 Aug, 17:05, Chonku cho...@gmail.com wrote:
Start with number 1. It will have a binary representation of 00...1 (Total
of n-bits)
Keeping adding 1 to it until you reach a number with all 1's in its binary
representation.
Looks correct to me,
here is a small implementation
Tail by default displays last 10 lines of file.
1. mmap the file
2. keep two pointers(A, B) pointing to beginning of the file
2. search for 10th \n using B, if not found i.e file has less than
10 lines, print from beginning to end
3. if found, start incrementing both A and B to the next \n.