- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 21
- Posts with Upvotes
- 20
- Upvoting Members
- 14
- Downvotes Received
- 5
- Posts with Downvotes
- 4
- Downvoting Members
- 5
187 Posted Topics
Re: Do you mean o(log n) or O(log n)? They mean different things. An algorithm will be O(log n) if there's some value C and some value m such that given an input of size n, where n>m, the running time will be less than C*(log n). And similarly for O(n … | |
Re: For [i]any[/i] function? Here's a tip: For any function f, f(n) = O(f(n)). It's true! He he he. Now, given T(1) = 1 and T(n) = 2T(n/4) + 1, you can find the order of growth using the Master theorem. One way, though, to think about the above problem intuitively, … | |
Re: Output buffers are flushed on program exit anyway... ![]() | |
Re: php.net should be avoided. It is fully of buggy and security-hole ridden examples. No, I don't have an example of this, I don't feel like going back and looking them up again. | |
Re: It's O(square root of n), not o(square root of n). | |
Re: [QUOTE=ithelp;487462]It is an NP complete problem , so you can only get some approximation algorithm to get it faster.[/QUOTE] No it's not. Learn what NP complete means. Learn what NP means. This problem isn't even in NP. | |
Re: This isn't really a C++ question, more of a C++/CLI question, which is a separate language. But if you looked in the System.String documentation, you'd see the answer: [url]http://msdn.microsoft.com/en-us/library/ezh7k8d5.aspx[/url] Your real problem is that you're using std::string in the first place -- if you're going to be creating a System::String^, … | |
Re: Don't start him with C++ (I mention this because you posted in the C++ forum). I remember trying to learn C++ in high school on my own; it was horrible, mainly because it has quite a bit of complexity whose purpose doesn't become clear immediately. It did not help that … | |
Re: Overloading is one thing, and polymorphism is another. Look at the definitions on the internet and then use thinking to figure how they are related and unrelated. | |
Re: shomashoma, remember that two sets S and T are equal if S is a subset of T and T is a subset of S. You know that the set of regular languages are those accepted by DFAs and NFAs. Hint hint. | |
Re: [QUOTE=scru;497101]Question's still open for anyone who might know an inline solution.[/QUOTE] There is [icode]x ? 1 + static_cast<int>(floor(log10(static_cast<double>(x)))) : 1;[/icode], but that solution is dumb (and doesn't consider negative numbers). I say it's dumb because casting to double means you have to deal with precision issues, and because it is … | |
Re: Have you ever actually had problems with people decompiling your code? | |
Re: [QUOTE=Ene Uran;505239]Call me young and foolish, but I really like Barack Obama, even though he is called a baby murderer because of his stance on abortion. Wonder if this country will ever get past single silly issues.[/QUOTE] Murder is not a silly issue. | |
| |
Re: The trouble with that algorithm is that it doesn't uniformly select all the possible combinations of numbers; it's biased. The trouble with vijayan's algorithms is that they rely on walking through all the possible numbers one must select from, which is slow. | |
Re: And here are some naive answers. 1. Type checking proves properties about the code. The compiler proves your assertion that your function returns an int, or that it returns something whose type depends on the types of the arguments in some way. They can also prove other claims you make … | |
Re: You assure that the algorithm works by proving it works. For recursive functions (and oftentimes, for things like while loops), you can prove the function works with the following sort of strategy: 1. Prove this fact: It works when n = 0. 2. Prove this fact for any positive integer … | |
Re: UML is stupid and should be avoided. And definitely shouldn't be studied and studied and studied and studied and studied... | |
Re: All these long, self-indulgent answers when the first was sufficient. | |
Re: That depends on the libraries you're using. The standard library also lets you output to files and to the stderr output stream. Other libraries exist that let you make windows in the windowing system and send text over a network. What you can use depends on what you have installed; … | |
Re: You can always do a replacement that produces a bigger value, when finding a big O bound. For example, consider: [code] i = 1 while i < n { for j in (0..i) { print j } i = i * 2 } [/code] We can note that the running … | |
Re: You shouldn't roll your own linked lists. Use std::list or std::vector (since there's little reason for prefering linked lists). | |
Re: OH GOD OH GOD OH GOD OH GOD OH GOD. Now I remember why I got an HP-49G. | |
Re: People won't want to waste their time giving help to somebody who won't put in a good effort in what they do -- so they think their help will be wasted. When you can't even put in the effort to write something with reasonable punctuation, it's a good rule of … | |
Re: You should use whatever you're most familiar with. | |
Re: You can probably find worst-case numbers though, using some comparisons to simpler equations. | |
Re: [quote="ithelp"]First choose the OS,Language on which your project assignment should work , then choose to simulate some real life scenario for your homework.[/quote] The platform is the [i]last[/i] thing you should choose. How can you know the appropriate platform before you've decided what you want to do? | |
Re: There isn't an easy way to do that in BNF, but maybe there is via one of its extensions. However, I'm pretty sure the mainstream extensions don't have that facility either. | |
Re: The best video game is the playlist I have playing right now. Rachmaninov Op. 1, 18, 30, 40, and 43. The storyline can't be beat! | |
Re: "Level"? What is a "level"? This question makes no sense. | |
Re: Take undergrad classes in the subjects to figure out what you're interested in. [quote=Lothia]common programming languages used for each field[/quote] It should be easy to pick up whatever programming languages you need when you get to them. | |
Re: This is not a computer science or software design question. Anyway, Linux distributions generally have some norms for how packages are distributed and installed. So first you need to think about that. There already exist package management systems to use -- for example, Ubuntu uses Debian's. Then there's the question … | |
Re: All of these can be programmed. | |
Re: [quote]Was it hard for you guys to learn programming for the first time?[/quote] No. It's not your teacher's job to tell you how to work on the project. | |
Re: MSDN has information on having multiple threads in C#. It's fairly straightforward. | |
Re: You'll need to use Javascript for the behavior of the page to be based on the contents of the text box. Learn Javascript and HTML and use that information to solve your problem. | |
Re: If you can't figure out a basic idea of the definitions after reading [i]books[/i] on the topic, I don't think reading some post in the forum will help you. | |
Re: There is no such thing as technical programming. Functional programming is the writing of software in a referentially transparent manner. Front end developers develop the front end, whereas back end developers develop the back end. Back end tools include storage facilities and microprocessors. Front end tools include graphics devices and … | |
Re: This might be the most depressing post I have read on this forum. I have to admit maybe you live in a different software development world than I live in. For example, the notion of "auditable solutions" and external auditing is something that I just don't deal with. Come to … | |
| |
Re: [quote=Narue] [4] A good example of this is re-entrant iteration. I have yet to see a good way to break off recursive iteration and then start it back at the same place (without coroutine support, of course)[/quote] Pass a function as an argument and call that. |
The End.