Forum: Geeks' Lounge Nov 8th, 2008 |
| Replies: 4 Views: 560 Login required; no reason to waste your time with this. |
Forum: Computer Science Nov 8th, 2008 |
| Replies: 5 Views: 818 By "builds" I'm only saying that permutes some elements of your array into the appropriate locations such that they form a heap.
But whatever. You should avoid thinking of the recursive process... |
Forum: IT Professionals' Lounge Nov 8th, 2008 |
| Replies: 3 Views: 929 |
Forum: Computer Science Nov 8th, 2008 |
| Replies: 5 Views: 818 What trickleup process are you talking about?
heapify builds the two child heaps and then trickles the root node into one of them.
Your real problem is that you aren't thinking recursively. |
Forum: IT Professionals' Lounge Nov 7th, 2008 |
| Replies: 4 Views: 549 The language to use is definitely C#. What API to use depends on which version of Exchange you're using. |
Forum: Computer Science Nov 6th, 2008 |
| Replies: 1 Views: 557 Bubbling down doesn't take O(n) time, where n is the number of nodes in the heap. Think again.
If you want to find a specific element in the heap, you have to traverse the tree.
For finding... |
Forum: Computer Science Nov 5th, 2008 |
| Replies: 2 Views: 815 |
Forum: C++ Nov 1st, 2008 |
| Replies: 8 Views: 855 You say rand() and it returns a random number between 0 and RAND_MAX.
That's how you use it.
You can call srand(something) to initialize the random number generator -- where something is a... |
Forum: Computer Science Oct 26th, 2008 |
| Replies: 4 Views: 1,236 Loading times? What are you talking about? |
Forum: Computer Science Oct 26th, 2008 |
| Replies: 4 Views: 1,236 For just parsing, it's probably Haskell, using the library Parsec. |
Forum: Computer Science Oct 26th, 2008 |
| Replies: 5 Views: 1,072 y:f(x)->x+1 is, um "nonstandard" notation. (Meaning: Where the heck did you come up with that?)
The lambda calculus notation for a function such as that would be
\x.x+1
where \ is meant to be... |
Forum: Computer Science Oct 26th, 2008 |
| Replies: 2 Views: 2,891 What makes you say a full adder has three outputs?
Your problem could be related to the fact that all your inputs and outputs in that picture you've posted seem to have the same name. |
Forum: C++ Oct 25th, 2008 |
| Replies: 8 Views: 566 Look into the std::getline function. |
Forum: Computer Science Oct 24th, 2008 |
| Replies: 12 Views: 1,822 What does it mean for a project to be related to IT? Please give examples of projects that are and aren't considered "related to IT". |
Forum: Computer Science Oct 24th, 2008 |
| Replies: 3 Views: 466 Why are there only two options? |
Forum: Computer Science Oct 22nd, 2008 |
| Replies: 1 Views: 636 I would test their flight ability by folding them up into a nonstandard paper airplane and dropping them out the window.
To be specific, I would scrap the idea of sequence diagrams altogether; if... |
Forum: C++ Oct 22nd, 2008 |
| Replies: 3 Views: 387 Yes. Allah can help you. Pray to Allah and then Hacker Jesus will come down and code for you. |
Forum: C++ Oct 20th, 2008 |
| Replies: 12 Views: 928 You should try reading what you quoted: "it has become common practice to implement a compile in the language it compilers." The first compilers were written in assembly.
And when writing a... |
Forum: C++ Oct 20th, 2008 |
| Replies: 12 Views: 928 |
Forum: C++ Oct 20th, 2008 |
| Replies: 4 Views: 556 What is 'device' supposed to be? I don't think you should be using inheritance for this problem. It's very weird to see the base class receiving the child class as an argument, especially to... |
Forum: Computer Science Oct 20th, 2008 |
| Replies: 2 Views: 495 Your chance of good advice about Fortran and BASIC materials are low; they are not very commonly used languages any more. A good recommendation about algorithms can't be given without knowing how... |
Forum: Computer Science Oct 20th, 2008 |
| Replies: 2 Views: 535 You don't need any mathematical knowledge to start a computer science degree, aside from the ability to do obvious algebra, like being able to tell that x = z - y if you know that x + y = z. What is... |
Forum: Computer Science Oct 19th, 2008 |
| Replies: 4 Views: 1,779 Sign-extending means the value of the most significant bit of the 16-bit integer (the sign bit, for signed 16-bit integers) is used to fill the 16 higher bits.
0abcdefghijklmno =>... |
Forum: C++ Oct 17th, 2008 |
| Replies: 25 Views: 1,867 |
Forum: Computer Science Oct 17th, 2008 |
| Replies: 1 Views: 484 |
Forum: IT Professionals' Lounge Oct 17th, 2008 |
| Replies: 7 Views: 1,096 what are "ideas" and "blocks"? |
Forum: Computer Science Oct 17th, 2008 |
| Replies: 6 Views: 826 Is this some kind of trick question? What is stopping you from trying out the different values of N and seeing the answer? |
Forum: Computer Science Oct 17th, 2008 |
| Replies: 1 Views: 506 Try fiddling with the equations some more. Also note that 1+D=D. |
Forum: Legacy and Other Languages Oct 17th, 2008 |
| Replies: 7 Views: 2,657 So my point is, you know that it's evaluating (split pivot ...) twice because you have the same expression written twice in there.
So where you have (list (quicksort (car (split pivot (cdr L) ()... |
Forum: Computer Science Oct 11th, 2008 |
| Replies: 1 Views: 545 At some site that sells ebooks. |
Forum: IT Professionals' Lounge Oct 11th, 2008 |
| Replies: 3 Views: 892 Why don't you start by making a timeline of prominent programming languages and major developments in their set of features. Then think about what problems these features were trying to solve, and... |
Forum: IT Professionals' Lounge Oct 10th, 2008 |
| Replies: 7 Views: 1,277 Python is friendly and relatively painless. |
Forum: Computer Science Oct 10th, 2008 |
| Replies: 3 Views: 931 What the **** does that have to do with the original posting? |
Forum: C++ Oct 10th, 2008 |
| Replies: 3 Views: 330 |
Forum: Computer Science Oct 10th, 2008 |
| Replies: 80 Views: 104,249 Very carefully, I hope! Why don't you start by learning how to compute time complexity for algorithms, in general. |
Forum: Legacy and Other Languages Oct 10th, 2008 |
| Replies: 7 Views: 2,657 I just KNEW you know Scheme's execution model! And you thought you could hide that fact from me... |
Forum: Legacy and Other Languages Oct 7th, 2008 |
| Replies: 7 Views: 2,657 One way to clean this up is to avoid letrec. Instead, write
(define (quicksort L)
(define (split piv li return) ...)
(if (null? L)
L
...))
Another thing is that godawful... |
Forum: C++ Oct 7th, 2008 |
| Replies: 16 Views: 1,577 |
Forum: C++ Oct 7th, 2008 |
| Replies: 4 Views: 454 No, there isn't. You can obviously translate the code manually, and it should be pretty easy. |
Forum: C# Oct 7th, 2008 |
| Replies: 5 Views: 741 You shouldn't be memorizing anything. You should be coding. Coding coding coding. For starters, you don't know what's worth remembering if you don't actually try and write some code. If you tried... |