Type: Posts; User: razzle
Search took 0.02 seconds.
October 18th, 2014, 03:56 PM
First you show that the problem in question can be reduced to a known problem, in this case a shortest path problem. (Even experienced programmers fail to do that as you can see in this thread).
October 11th, 2014, 05:26 PM
Sure, or take the exponentials of the lengths and multiplying them rather than adding them.
What an easy way to look complexitoratively smart without adding anything, isn't it superbonzo!
October 11th, 2014, 04:46 PM
No it's not.
Dijkstra is about lowest cost as I've explained in previous posts.
Furher more Dijkstra is a special case of Dynamic Programming. It's based on the Bellman optimality principle.
October 11th, 2014, 09:04 AM
My interest here was to show that you have a shortest path problem indeed. People often miss that "shortest" is there for traditional reasons and should be read "lowest cost" really....
October 11th, 2014, 08:55 AM
Sorry I missed this post but I've come to the same conclusion. Dijkstra is fine.
October 11th, 2014, 08:35 AM
Are you sure? To me it looks like a slight variation of the shortest path problem.
In the shortest path problem the challenge is to find the lowest cost path between two nodes in a network.
October 9th, 2014, 04:49 AM
I wouldn't be that categorical.
Using const is about complexity reduction by way of voluntary limitation of choise. Another example of this is to declare variables in the most narrow scope...
October 9th, 2014, 04:02 AM
There are only two parameter passing mechanisms in C++ namely by-value and by-reference so I assume you want to compare those. The const keyword is just a qualifier that can be used in either case.
October 9th, 2014, 12:46 AM
I think you're too imprecise in your problem description but okay, finding the k'th smallest element in a sequence is a known problem called selection and is described here for example,
October 8th, 2014, 01:11 AM
What does this means? What is it that you want to find?
October 8th, 2014, 12:54 AM
October 3rd, 2014, 06:12 PM
Because there's no such thing as true randomness in digital computing. Everything is pre-determined really, or deterministic as it's also called.
You start a random number sequence by supplying a...
October 3rd, 2014, 12:29 AM
Then view it as a chance to demonstrate your cognitive capabilities.
Write the programs, get an A and show that you're intelligent and resourceful and an asset, and not some no good nobody.
September 26th, 2014, 04:48 PM
So where is it then? Show us!
C++ is not defined by its compilers.
C++ is not defined by your personal experience or anyone else's.
C++ is defined by a standard.
September 26th, 2014, 03:40 PM
It seems the regex is working on a string that's an interpretation of a more original data structure.
It looks like the months strings were originally numbers.
My idea is that you try to get...
September 26th, 2014, 04:28 AM
One excellent way to avoid this problem is to use dynamic data structures rather than static. For example use an std::string rather than a C-string and use an std::vector rather than a C-array or...
September 26th, 2014, 01:15 AM
The C++ 11 standard introduced a number of important additions to the language (including lambda expressions which were mentioned). But that doesn't mean you absolutely must start using them right...
September 25th, 2014, 02:06 AM
I suggest you start by formalizing all aspects of an agreement in an abstract base class called Agreement. There's no way around it. If you don't have that you have no design.
September 22nd, 2014, 04:36 PM
Sometimes I get tired of the complexity of a fullblown IDE and dream about simpler times when you did everything from basic principles and were in complete control of every single file.
September 22nd, 2014, 07:50 AM
I would use Emacs only if I knew why I wanted to use it.
I would use Visual C++ for any development on Windows, Qt application or not. But if it was a true multiplatform Qt application I would...
September 22nd, 2014, 07:20 AM
Qt Creator is an alternative to Visual C++ whereas Emacs is an alternative to Notepad. Well, sort of. :)
September 22nd, 2014, 03:45 AM
One of the most prominent examples of this is Microsoft. Native C++ and MFC were abandoned for over a decade. Instead managed code and .NET were hyped as the future and where all the smart money was...
September 22nd, 2014, 02:37 AM
There are two major differences between class and struct. A struct has public access by default and it has public inheritance by default. A class is private by default in both these cases.
September 22nd, 2014, 02:28 AM
As I've shown, you have no support for that claim in the C++ standard.
You simply cannot tell the size of the struct with or without the bit-fields unless you know which exact compiler is being...
September 21st, 2014, 01:24 AM
C++ is not defined by some "manual". It's defined by the C++ standard and it states that the allocation of bit-fields is implementation dependent (see 9.6 bit-fields). This means "trying out" may...
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.