i need to write a function that inputs a number and tells if its palindrom or not
i wrote a code which calculates the length of the number and gets each cycle the digit
how to continue
?
...
Type: Posts; User: newyork
i need to write a function that inputs a number and tells if its palindrom or not
i wrote a code which calculates the length of the number and gets each cycle the digit
how to continue
?
...
in your base "if"
what is the meaning of array is true
?
you are checking that there is a cell
then the array is not NULL
?
i'll try and put it together
thanks :)
but i cant use 4 parameters in my function
i can use the array and its input only as input
the problem doesnt allow me to change the array
and i cant "iterate through the array" because its not an itterative problem ,it a recursive problem
what base case should i use?
i cant "iterate through the array" because its not an itterative problem ,it a recursive problem
what base case should i use?
but i want maximal sum as close as possible to N
(<=N)
it differs then just =N which you proposed
i am locked on the helping function solution
i cant figure out how you made it
could you say a few words about your algorithm
?
it doesnt say there what base case to use
what is the base case
?
i said that when i have i cell array return it
if two cell array then return its subtraction
is it ok
or its wrong?
i need to know the basic logic of the solution
recursive thinking differs itterative
i can think of a base case where i have a array of 1 cell
what should i do with it
?
i need to present the combination which will get me as close as i can to N
what are the base cases to use???
i want to know whats the base case
and whats the itterative step
i need to see the logic of it
i need to use here a string to strore to final sequence
how recursivly go by every combination of the array
int max(int arr[],n)
{
what is size_t?
what is s_val?
what is the role of gap?
we dont need to look in allthe array for the smaleest
we only need to look for cells which are on the right
but we should get arr+1
code]fall=arr[0]-smallest_num(arr+1,len,num);
i got a bag which can take "n" kilograms inside of him
and i have a list of items in which each item has a different weight.
i need to calculate a combination for which it will fill the bag as...
span(int array,int len,int num,int gap )
{
if (len==1) return num;
if some recursive calls
}
wow it 2:30 am i will try at it tommorow
thanks
what is the strucrure of span function
what it does?
i am allowed to use only the array and its length in the signature of the function
i did like you told here...
we have tried many ways
could you give a hint regarding the way of solving it?
ok i did exactly like you told me but i have lots of problems with the pointer part of the function
in the largest fall function
the main one
i use smallest_num(int arr[],int len,int num); to...
you presume that the array is sorted but its not
so we need to use a helping function to find the smallest value?
i wasnt told by my instructor to do so.
i did it because i build the function to split it into smaller subproblems with smaller arrays.
http://i52.tinypic.com/mrqs1e.jpg
in the end we will get...
yes helping recursive only function are allowed
why my stopping conditions are wrong
?