Skip to main content
Shariff's user avatar
Shariff's user avatar
Shariff's user avatar
Shariff
  • Member for 12 years, 8 months
  • Last seen more than 11 years ago
awarded
awarded
awarded
comment
Depth of a Binary Search Tree
Wow, This is a simple and good algorithm :) is just that I want to knew the level of each node because I want to do a function that checks if the binary tree is balanced, using the property that for each node n in the tree their 2 subtrees have difereence in depth of 0 or 1. @AronAhmadia: How I can use the algorithm by Bernardo to implement this??
awarded
comment
Depth of a Binary Search Tree
It looks like working... why?
comment
Depth of a Binary Search Tree
you mean: int auxDepth(int counter, Bin Node Pointer) ?
comment
Depth of a Binary Search Tree
but this works for Binary Search Trees?? What happen if a node has no childs?? why return + 1 ?? (Sorry for all tihs questions, is just that I am new with binary Search trees and recursion)
asked
Loading…
comment
Contiguous prime numbers with MPI (Want more ideas for an efficient algorithm)
@GeoffOxberry: How I delete the question in the math.SE ??
comment
Contiguous prime numbers with MPI (Want more ideas for an efficient algorithm)
@Paul : I dont know how to implement it :/ (No I am not using it)
comment
Contiguous prime numbers with MPI (Want more ideas for an efficient algorithm)
Hi, I know but, How I implement that? I mean I dont know how to translate it into code
comment
Contiguous prime numbers with MPI (Want more ideas for an efficient algorithm)
By the way, thanks for your improvements, the runtime was about the half that I have previously
comment
Contiguous prime numbers with MPI (Want more ideas for an efficient algorithm)
I know what r u saying, but, I dont have access to an Array because then I have to do Send and Receive messages, which means that I will have more Overhead (that is not the idea). I think that an implementation on the Sieve of Erasthostenes will be grat, but I dont know how to translate the algorithm in code...
awarded
comment
comment
Contiguous prime numbers with MPI (Want more ideas for an efficient algorithm)
hi, thanks for the info of the loop for. the i = 3 sounds good! About testing the sqrt(n), how I test agains the primes smaller than sqrt(n)? I mean, how I can get this primes numbers??
awarded
Loading…