One question, if I may: why is it be illegal?
Type: Posts; User: assertion
One question, if I may: why is it be illegal?
What kind of job interview are you going to that you worry about linked lists?!?
Anyways, in C++, the standard says that for any container you have access to the end() in amortized constant time. So...
So, what is your question?
(a) What is a "random route"? (NB: mathematical descriptions are not appropriately explained by example. What are the conditions you can/want to/have to work with? Do you work with all 2^n sub-tour...
There is no standard (as in ISO 14882) way to do it in C++. It is a operating system related question. So: what operating system do you use? In Linux&BSD a system("netstat") will be the quick&dirty...
A self-defined operator most likely won't improve efficiency, on the contrary: unnecessary assignments can be optimized away with compiler-generated operator=, but since the compiler doesn't know...
That's right. But:
std::vector<std::string> foo(std::istream_iterator<std::string>(std::cin),
std::istream_iterator<std::string>());
does what you think it does (calling the range...
Assuming that the program runs under the same privileges as usual for that user, the possible "Read Mail Really Fast"-command wouldn't be a new security problem. And depending on what you want to do,...
Unfortunately, Wikipedia disagrees with mathematics and computer science mote often than not. You wouldn't believe how often I find myself in situations like that:
"The given graph has this-and-that...
A vector will take about as much space as an array in C (well, up to 1.5 times as much if you fill it via push_back and don't reserve() before that). So if your lists of phrases are alltogether 30MB,...
What do you want to do? Do you only require a unique id, do you require the current time to be part of it, if so, are the timestamps unique, how exact has the time to be, will it have to be...
[Really off-topic - definitions of paths and walks]
A walk is a path in which self-intersections are allowed, a path does not have self-intersections. At least that is the definition in...
[off topic: minimal path length in an arbitrary graph is NP-complete]
(a) we define a path to have no self-intersections. This way, a minimal length path is defined.
(b) Containment in NP is...
Well, Dijkstra's Algorithm only works for Digraphs with positive weights, whereas Warshall's Algorithm finds all shortest paths for a Digraph with conservative weights, rather like Bellman-Ford for...
I thought you might have access via a university/library.
Anyways, how would sorting with a relaxed heap be different from sorting with another type of heap? You get your min element and remove it...
Thanks for your fast replies. I'll have a look at Tiny xml.
I don't really need xml, but I like the format for its extensibility and readability (plus, it is known by about everyone dealing with...
In a (Min) "weak" (or "relaxed") heap, only the right child of each node is guaranteed to have a greater key than the parent node, and the root has no left child (thus, the root is the max element)....
Hello,
while opening a ~50MB file, libxml++ used ~1.5GB RAM, which I find somewhat excessive. Is this an error in my usage (i.e., did I forget to set some hidden "don't waste memory"-flag?) or is...