[algogeeks] Re: pls help

2011-08-10 Thread Amethy hobby
is it like a number base problem? where a set of alpha is (0,1,2), and the n is the lenght of number such as (p,n) 3 (0,1) of length 3 so the value is (000)(001)(010)... On 8月10日, 下午9时19分, Amethy hobby news...@gmail.com wrote: I thought the backtracking is the method to solve this problem

[algogeeks] Re: Amazon question.

2011-08-10 Thread Amethy hobby
it also like Pythagorean theorem; so the a[k] also with the value where a[j]-a[i]a[k]a[i]+a[j] and a[k]a[j]=a[i]; On 8月9日, 下午10时43分, Samba Ganapavarapu sambasiv...@gmail.com wrote: We have an array of integers, we need to find the element a[i],a[j] and a[k] values where.. a[i]^2 + a[k]^2 = a[k]

[algogeeks] Re: doubly linked list program error

2011-08-01 Thread Amethy hobby
if(start==NULL) { tmp-prev=NULL; // run here , the start==null, so the start-prev is error start-prev=tmp;//here start=tmp; } On 8月1日, 下午8时41分, Rajesh Kumar testalgori...@gmail.com wrote: programs gives segmentation fault when we creat linked list plz

[algogeeks] Re: program to find max and min element in an array using recursion...

2011-08-01 Thread Amethy hobby
#include stdafx.h #include iostream using namespace std; typedef pairint,int node;// first is max. second is min typedef int m_iterator; node maxmin(int *a,m_iterator start,m_iterator end) { if(start==end-1){ //only hava one elements return