OK, so i do have a perfectly good working code but im trying a different way and its bugging me why its not working. any help would be much appreciated. the program suppose to list all the available directories and then ask the user which directory he's searching for, takes the input and search for the directory. if the directory exist it will find it and list all the files in it and the path to it. if it can't find the directory it will throw a message or exception saying so. Now it lists all the directories just fine … +0 First question, is there any difference between binary search and recursive binary search??? I looked through google and everything but couldnt find any useful info. I did find irritative and recursive but that was it. and second question: Given a desired search value of 98 and an array with the following sorted integer values: Index: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Value: 1, 12, 28, 35, 49, 62, 73, 86, 98, 120 Indicate the comparisons made in a recursive binary search function, as well as the values for each of the following variables: int low, int … +0 Code Snippet A Memoize Decorator for Python Recursive Functions This shows the application of a Memoize decorator to speed up recursive functions in Python. +4 Hello ! I have a task that is difficult for me to handle. The task is: Create recursive function that can be generate a string of length N (N <= 100), formed by the letters 'A', 'B' and 'C' and does not containing two identical adjacent substring. For example: enter for N = 6 and the program should generate such a string in which no one else to repeated substrings: ABACAB. Wrong strings are: **AA**BACA - because 'A' is to 'A'; A**BCBC**A - as 'BC' is to 'BC' and **ABCABC** is also wrong because 'ABC' is to 'ABC'. I made … +0 How do I write a recursive function to compute (3^2)+(3^3)+(3^4).......+(3^n) ? +0 How do I write a program to compute run-time of a recursive and non-recursive functions to find the 43rd Fibonacci number? +0 So I am trying to remove line feed within an array but not cariage returns. Having trouble using array walk, the ltrim function is not working. I need to remove ONLY the line feed("\n") not the cariage return("\r") so using trim will not work. I tried setting the chr(10) and still not working. Any idea's \$array = array( [0] => array(C1TEXT => 0001), [1] => array(C1TEXT => 0002), [2] => array(C1TEXT => \n), [3] => array(C1TEXT => \r), [4] => array(C1TEXT => 0003), [5] => array(C1TEXT => 0004), [6] => array(C1TEXT => 0005), [7] => array(C1TEXT => \n), [8] => … +0 Hello, I want help for recursive in php which like structure is attachment file.. [1] **Sire (Parent)** > Sub1 ->nChild.. > Sub2 [2] **Dam (Parent)** > Sub1 ->nChild.. > Sub2 ->nChild.. Do you have some example of code so its better for me. Thank You. +0 hi all, this is some extra credit from class we sat around cleaning up code today this is what we came up with public boolean equals2(IntTree t2){ return equals2(this.overallRoot, t2.overallRoot); } private Boolean equals2(IntTreeNode r1, IntTreeNode r2){ if(r1 == null || r2 == null){ return r1 == null && r2 == null; } return ((r1.data==r2.data)&& equals2(r1.left, r2.left) && equals(r1.right, r2.right)); } we get five points extra credit if we can shorten any further. So my question iscan someone explain to me the ^ character and is that the right path to shortening this code +0 Im trying to add odd numbers recursively from n to m but its not working . im sure its in the recursive logic on how im passing the arguments or something. public static int OddSum(int low, int up,int total) { if(low==up) { return up; }else { low+=2; return total += OddSum(low,up,total+low); } +0 Code Snippet Simple recursion unique raffle Raffle function to generate unique numbers for each player, related to the same table with a recursive aproach. I had to do a simple raffle system for a contest that I was working on and tried many things and the most simple and the most effective one to generate unique numbers for each player was this, a simple recursive function. +0 In most modern languages, there are two fundamental approaches to repeating an action: either *iteration*, in which an action is placed inside a special-purpose structure which causes the action to be repeated, or *recursion*, in which a general-purpose function calls itself (or another function which in turn calls the earlier function). Which is to be used depends on the nature of the problem at hand, and to a great degree, the language being used. Some languages, especially Lisp and the various functional languages, strongly favor recursion; but most other languages, including C++, focus almost entirely on iteration. As a result, … +1 Hey everyone, I really need help in solving a problem that I have to use recursion for. I have a list of paper objects. Each paper object has its own author(s) objects. Each author object knows which paper(s) objects they belong to. I have to build a scholarly neighborhood for these authors. The user can select an author and specify the "width" of the neighborhood that they wish to view. The width of this neighborhood goes as follows: If they enter "0" the neighborhood will consist of only the author that they selected. If they enter "1" the neighborhood will … +0 Hey guys I had an assignment to recursively write the Towers of Hanoi then test it. I did not have too much of an issue getting the program written But I am not sure what the book means by test the efficiency do they want the number of moves my program makes, or do they want the time it takes to run. And how do I get either one? help is appreciated [CODE] import TerminalIO.KeyboardReader; public class towers { public static void main(String[] args) { KeyboardReader reader = new KeyboardReader(); int numberofRings = reader.readInt("Enter number of Rings: "); move (numberofRings, … +0 float det(float A[][10],int m) { float B[10][10],d=0; int i,a,b,x,y; if(m==2) return (A[0][0]*A[1][1])-(A[1][0]*A[0][1]); else { x=0;y=0; for(i=0;i #include #include #include using namespace std; class RMatrix { int sizeH; int sizeL; int TotalN, Replace; protected: bool ** Matrix; RMatrix(int, int); ~RMatrix(){for (int x = 0; x

The End.