April 2005 - Posts

Find work in Ireland

It is possible to find a job as .NET developer in Ireland for non EU citizen?

Search a heap algorithm

I took a cource “Data structures” as part of my university studies, it is a real torture comparing to all previous cources , not to mention .NET courses ;-). But it is always good to know the basics. Now we are studing a heap and heapsort. A "heap" is a binary tree which has the property that each child is "smaller" (for an appropriate definition of "smaller"; this generally requires that the data type be totally ordered) than the parent. Another property is that left child of parent(i) is located index 2i, right child on 2i+1. The problem was to find efficient algorithm for searching the heap. I didn't find such one in the net. So I tryed to write it by my self, I am not sure if it is most efficient way so I am waiting for your feedbacks.

// pre: array must be a heap
private
static int search(int[] array, int i, int num)
{
if((i)>(array.Length))
   return -1;
if((num>array[i-1]))
   return -1;
if(array[i-1] == num)
   return i;
return max(search(array,(2*i),num),search(array,(2*i)+1,num));
}

I couldn't make by iterative way, is it possible?

WSE Deployment

Yesterday I spend whole evening on deployment WSE application. I have webservice and client with WSE implemented. Both of them worked fine on local machine while developing but they refuse to work on remote hosting.
After searching over net the only solution I found is to install WSE on both server and client. Well, I could speak to my hosting guys to install WSE, but I think that end users, to them client application will be distributed ,would be little confused while installing it. End users do not like complicated installetions so WSE not good for me. Now I am looking for another security solution that makes less touble in deployment.