This is my first problem: gcd(x,y) if (x < y) gcd(y,x) else if (y = 0) return x else return gcd(y, x mod y)
How do I create a recursive anonymous function in Clojure which is not tail recursive? The following clearly doesn\'t work, as recur is only for tail recursive functions.I\'m also reluct开发者_Go百科
I\'ve been trying to solve this problem for hours. function expand that takes a list of elements and frequencies and expands them into a simple list. For example, the result of (expand \'(a (3 b) (3 a
I got the code from this question, I ran it in Eclipse and the code was fine, but I confused myself in how the recursion order goes internally.
Here\'s a section of code from one of my classes: public void run() { SomeClass[][] someClassArray = new SomeClass[6][];
I have just started looking at javascript so hopefully this will be something simple. I want to make a slideshow of images that plays automatically. This is very simple, and there are a few tutorials
I have this recursive function, where thumbs is array of IMG objects... Whole function works properly for me in Chrome, IE9, FF and so on, but freezes in IE8 after refreshing or navigating from site t
I have the following class that is supposed to represent a hierarchical data structure class Person { int Id { get; set; }
I\'m trying to simplify one of my homework problems and make the code a little better. What I\'m working with is a binary search tree. Right now I have a function in my Tree() class that finds all the
I am imagining a function which I figure would use Regex, and it would be recursive for instances like <p><strong></strong></p> to remove all empty HTML tags within a string. T