Well a "double" pointer (A more accurate term is multidimensional pointer,
in this case a two dimensional pointer) is basically a pointer to an array
of pointers.
So, int **ptr basically says, ptr is a pointer to an array of pointers. And
you can allocate memory to each of these pointers individua
int **x;
x = new int*[n];
for (int i = 0; i < n; i++){
x[i] = new int[m];
}
On Sat, Jul 23, 2011 at 1:10 AM, Bhavesh agrawal wrote:
> double pointer mean like **p
>
> hoe to allocate memory for this
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorith
Heres a problem that I've been trying to solve using Dynamic
Programming but I've got no where with it. Any hints would be
appreciated.
A program's library offers a simple function to split a string into
two parts. As this operation requires copying the entire string, it
takes time n, where n is t
Heres a problem that I've been trying to solve using Dynamic Programming but
I've got no where with it. Any hints would be appreciated.
A program's library offers a simple function to split a string into two
parts. As this operation requires copying the entire string, it takes time
n, where n is t
I didnt quite get this problem. Sample case?
On 4/4/11, rajat ahuja wrote:
> You have to paint N boards of length {B1, B2, B3… BN}. There are K painters
> available and you are also given how much time a painter takes to paint 1
> unit of board. You have to get this job done as soon as possible u
It is NOT possible to multiply two matrices in less than O(n^2) simply
because there are n^2 elements, and you got to "touch" all of them at
least once!
Rakib
On 12/10/10, Luciano Junior wrote:
> Dave, thank You very much for yours information. Really, I want to
> know a theorical big-O algorith
Try using Strassen's Matrix Multiplication Algorithm.
Regards,
Rakib
On 12/8/10, Luciano Junior wrote:
> What is best multiply matrix algorithm for:
>
> -multiply a n x n matrix by another n x n matrix
> -multiply a m x n matrix by a n x p matrix
>
> I need a best performance cpu algorithm.
> N