Search Results

Showing results 1 to 40 of 41
Search took 0.07 seconds.
Search: Posts Made By: Rashakil Fol ; Forum: Computer Science and child forums
Forum: Computer Science Nov 15th, 2009
Replies: 8
Views: 771
Posted By Rashakil Fol
For example, suppose you have a function
int f(int n) {
if (n == 0) {
return 1;
}
else {
return n * f(n-1);
}
}
We want to measure its cost. But before we do so, we'll...
Forum: Computer Science Nov 13th, 2009
Replies: 8
Views: 771
Posted By Rashakil Fol
Create a recursive formula for the time complexity and figure it out from there.
Forum: Computer Science Nov 11th, 2009
Replies: 4
Views: 546
Posted By Rashakil Fol
Hey, you're right, it is easy for me.
Forum: Computer Science Nov 11th, 2009
Replies: 8
Views: 771
Posted By Rashakil Fol
Let's look at this one. I'm going to ignore the swap for now.
Iteration2:
public static long dominoes(long x, long y){
long temp;
double koeficient = 0, faktor;
for(long i=0; i<=x+y;...
Forum: Computer Science Nov 11th, 2009
Replies: 8
Views: 771
Posted By Rashakil Fol
Addition is O(n) where n is the number of bits in the BigInteger, and multiplication depends on the algorithm used: http://en.wikipedia.org/wiki/Multiplication_algorithm . That depends on the Java...
Forum: Computer Science Nov 6th, 2009
Replies: 9
Views: 456
Posted By Rashakil Fol
Search for it on Google. It's a nice language that has access to all the Java libraries.
Forum: Computer Science Nov 5th, 2009
Replies: 9
Views: 456
Posted By Rashakil Fol
Learn Clojure.
Forum: Computer Science Oct 20th, 2009
Replies: 8
Views: 436
Posted By Rashakil Fol
When you run a Theta(n) operation n times, it takes Theta(n^2) time to do. I mean in general if you run an operation that takes n seconds n times, it's going to take n*n seconds.
Forum: Computer Science Oct 18th, 2009
Replies: 8
Views: 436
Posted By Rashakil Fol
No, when n is the size of the array, resizing takes Theta(n) time because you have to copy all the elements.
Forum: Computer Science Oct 18th, 2009
Replies: 8
Views: 436
Posted By Rashakil Fol
You would just write that each push and pop wolud take Theta(n) time. (And so the average time per operation is Theta(n) which is bad because we'd like it to be O(1).)
Forum: Computer Science Oct 13th, 2009
Replies: 5
Views: 386
Posted By Rashakil Fol
MS Visual C++ Express. It should work.

Edit: as a stopgap, if you're short on time, you can run single-file C++ programs at http://codepad.org/ . But it's in your best interest to get a compiler...
Forum: Computer Science Oct 13th, 2009
Replies: 5
Views: 386
Posted By Rashakil Fol
You can compile and run the program if you want to see if it works.
Forum: Computer Science Oct 13th, 2009
Replies: 3
Views: 417
Posted By Rashakil Fol
Yes, read through the Time Complexity of Algorithm thread. It's a very old thread and has practical and theoretical answers.
Forum: Computer Science Sep 25th, 2009
Replies: 6
Views: 619
Posted By Rashakil Fol
What courses are available and which ones are good depends on which school you're going to. There is a lot of variety in the ways various computer science departments teach.
Forum: Computer Science Mar 4th, 2009
Replies: 30
Views: 3,155
Posted By Rashakil Fol
I'm going to haunt all your posts and make your existence on this forum a miserable one.
Forum: Computer Science Mar 2nd, 2009
Replies: 30
Views: 3,155
Posted By Rashakil Fol
Forum: Computer Science Mar 1st, 2009
Replies: 4
Views: 1,499
Posted By Rashakil Fol
Anyway, your first example (where A gets assigned 54) is perfectly right.
Forum: Computer Science Mar 1st, 2009
Replies: 4
Views: 1,499
Posted By Rashakil Fol
When you store something in B, that means the predefined value will be overwritten.
Forum: Computer Science Feb 22nd, 2009
Replies: 4
Solved: OO design issue
Views: 609
Posted By Rashakil Fol
Well clearly, the matrix manipulation class should provide clear error messages, throwing exceptions when you try to do impossible things. What do you expect integers to do when you divide by zero? ...
Forum: Computer Science Feb 22nd, 2009
Replies: 4
Solved: OO design issue
Views: 609
Posted By Rashakil Fol
Define 'provider' and define 'consumer'. What do you mean by 'putting a car in a garage'? That analogy can mean different things. (Maybe just tell us what you're doing.)
Forum: Computer Science Feb 1st, 2009
Replies: 8
Views: 4,459
Posted By Rashakil Fol
Forum: Computer Science Feb 1st, 2009
Replies: 30
Views: 3,155
Posted By Rashakil Fol
What is the purpose of this post?



Reality disagrees with you.
Forum: Computer Science Jan 31st, 2009
Replies: 8
Views: 4,459
Posted By Rashakil Fol
Nobody could help you unless you listed specific books for which you wanted solutions manuals. And since nobody here would know how to find them off the top of their heads, you might as well do the...
Forum: Computer Science Jan 20th, 2009
Replies: 5
Views: 1,399
Posted By Rashakil Fol
Forum: Computer Science Jan 15th, 2009
Replies: 16
Solved: Help me!
Views: 1,033
Posted By Rashakil Fol
Use C#, not Java. Java is the worst language in popular use, besides C++.
Forum: Computer Science Jan 8th, 2009
Replies: 5
Views: 630
Posted By Rashakil Fol
And that doesn't matter. If you want better code writing techniques in languages like C#, the easiest and best way is to learn Haskell.
Forum: Computer Science Jan 8th, 2009
Replies: 5
Views: 630
Posted By Rashakil Fol
Forum: Computer Science Jan 7th, 2009
Replies: 5
Views: 630
Posted By Rashakil Fol
Learn Scheme, C++, Haskell, and C#. That will take some time. You have to actually do projects in them, of course.

The languages you've listed, and most other languages, are not worth learning...
Forum: Computer Science Nov 26th, 2007
Replies: 8
Views: 1,965
Posted By Rashakil Fol
How much money? 2 hours = $400.
Forum: Computer Science Sep 17th, 2007
Replies: 7
Views: 5,417
Posted By Rashakil Fol
It's not that hard. First you can just grep the compiler name. For Haskell you can grep '.lhs'. If that fails, then for any compiled gc'd language you can just look at the garbage collector. ...
Forum: Computer Science Aug 18th, 2007
Replies: 3
Views: 1,226
Posted By Rashakil Fol
Um, it's hard to understand you, so I'm going to guess that the answer depends on the definition of 'driver'.

Edit: but more seriously, I'd say no, based on the way the word 'driver' is used in...
Forum: Computer Science Jun 14th, 2007
Replies: 12
Views: 2,917
Posted By Rashakil Fol
MinGW, not MiniGW.
Forum: Computer Science May 9th, 2007
Replies: 3
Views: 1,816
Posted By Rashakil Fol
Store the array alongside a 'multiplier value' that you multiply the elements of the array by when reading them (and divide by when writing...). Then have MultiplyAll simply change the multiplier...
Forum: Computer Science Apr 13th, 2007
Replies: 29
Views: 6,549
Posted By Rashakil Fol
That does the trick, except that computing A[j]/n takes log(n) time. But it is nice.
Forum: Computer Science Apr 8th, 2007
Replies: 29
Views: 6,549
Posted By Rashakil Fol
Because it's wrong. You can make assumptions of O(1) comparison for comparison-sort based algorithms, mainly because the comparison operation is in fact O(1) average over the course of the sorting...
Forum: Computer Science Apr 7th, 2007
Replies: 29
Views: 6,549
Posted By Rashakil Fol
Considering that computing sqrt(N) takes log(N) time (at least), square rooting all the integers that you're sorting will doom you to N*log(N) complexity. And it will just arrange your elements into...
Forum: Computer Science Apr 5th, 2007
Replies: 29
Views: 6,549
Posted By Rashakil Fol
Are you sure you don't need to provide O(N) _average_ time?
Forum: Computer Science Apr 5th, 2007
Replies: 29
Views: 6,549
Posted By Rashakil Fol
Here's some ideas about strategy: First of all, consider an extreme case, where sqrt(n) buckets have sqrt(n) elements fall into them. Well, know (by induction) that any bucket with more than...
Forum: Computer Science Apr 5th, 2007
Replies: 29
Views: 6,549
Posted By Rashakil Fol
What about something like this:

Make buckets for the ranges 0..n-1, n..2n-1, ..., n^2-n..n^2-1.

Then, first go through the array and fill the buckets with counts of how many elements fall in...
Forum: Computer Science Jan 1st, 2007
Replies: 3
Views: 2,268
Posted By Rashakil Fol
Now what do you mean, saying array insertion is carried out in constant time? What do you mean by insertion? Exactly what datastructure are you using to represent the array? If you've got some...
Showing results 1 to 40 of 41

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC