Daniel Scocco
  • Member for 10 years, 5 months
  • Last seen more than 2 years ago
Handling extremely large numbers in a language which can't?
25 votes

You are looking for an arbitrary precision arithmetic (also called "multiple precision" or "big num") library for the language you are working with. For instance, if you are working with C you can use ...

View answer
Should I update blog posts or rewrite them as technology (and me) changes?
Accepted answer
23 votes

I think the best approach is to leave the old entries/code samples where they are, and to add new ones with your new ideas/code samples. Then you can include a link on the older posts pointing to the ...

View answer
Recursion without factorial, Fibonacci numbers etc
23 votes

Here are some more practical problems that come to my mind: Merge Sort Binary Search Traversal, Insertion and Removal on Trees (largely used on database applications) Permutations generator Sudoku ...

View answer
Can anyone help solve this complex algorithmic problem?
9 votes

It looks like a derivation of the shortest path algorithm, so you basically consider each station to be a vertex of a graph, and the edges are weighted to their distance (in terms of fuel). Then you ...

View answer
Does it make sense to avoid a framework when building a large webapp with PHP?
7 votes

In my opinion a framework should only be used if it makes the development process easier for you, and not cumbersome. There's nothing wrong with not using a framework or building your own, especially ...

View answer
How is precedence determined in C pointers?
Accepted answer
7 votes

My guess for the first one: ptr is a pointer to a function that takes as parameter an int, and returns a pointer to a function that takes as parameters a pointer to pointer to double and a char, and ...

View answer
Naming conventions used for variables and functions in C
6 votes

In my opinion 90% of the naming problem is solved if you keep three things in mind: a) make your variable and function names as descriptive as possible, b) be consistent throughout your code (i.e., ...

View answer
Why do people still say Java is slow?
6 votes

Opinions are opinions, and facts are facts. Here's a fact from the Google Code Jam, which arguably challenges programmers to solve tough computing problems in a short period of time, meaning that ...

View answer
What would be an appropriate algorithm to factorise numbers in the range of a few billion?
Accepted answer
5 votes

My approach for those problems is usually this one: build the simplest possible algorithm to solve it, which is usually a brute force naive approach, and then test/figure mathematically whether or not ...

View answer
Resources on learning to program in machine code?
4 votes

If you want to understand how the machine works completely, why don't you go the lowest level possible and build your way up to where you are (e.g., C,C++)? By that I mean: why don't you build your ...

View answer
Choosing a web development framework?
Accepted answer
3 votes

You answered it yourself: you prefer to code in Python and in Ruby rather than in PHP, and you are more familiar with Python out of the two. So Python it is, and Django as the framework, as it's the ...

View answer
How far is the trail from Java to C / C++?
Accepted answer
2 votes

C is a very small language, so any experienced programmer willing to put enough effort and time should be able to become proficient in it in 3 months in my opinion (this includes creating some medium ...

View answer
Algorithm refresher. Why is heapsort an insort algorithm?
1 votes

If, as you say, one really needed an extra structure to build the heap then heapsort would indeed NOT be an inplace sorting algorithm. However, this is not the case. You can build the heap on the ...

View answer
How to handle "X" data sets as input
Accepted answer
1 votes

I don't think there's another option other than the ones you mentioned. You either: a) iterate through all the the data sets and work on them as they come up or b) store everything (in some ...

View answer
does quicksort provide less swapping step?
1 votes

On average Quicksort sorts an array in n(log n) time (which is almost as good as it gets). In worst case it takes n² (but this happens rarely). Another common sorting algo that takes n(log n) time to ...

View answer