tagged [recursion]
Recursive List Flattening
Recursive List Flattening I could probably write this myself, but the specific way I'm trying to accomplish it is throwing me off. I'm trying to write a generic extension method similar to the others ...
Count Number of 1's in A Binary Representation of N, RECURSIVELY. in JAVA
Count Number of 1's in A Binary Representation of N, RECURSIVELY. in JAVA I understand the concept that the number of 1's in N is the same as N/2 if it's even, and N/2 + 1 if the number is odd, but I ...
Way to go from recursion to iteration
Way to go from recursion to iteration I've used recursion quite a lot on my many years of programming to solve simple problems, but I'm fully aware that sometimes you need iteration due to memory/spee...
- Modified
- 15 Jun at 17:26
Recursive call - Action lambda
Recursive call - Action lambda What am I doing wrong here? How can I execute my action? I'm getting a red squiggly when calling `recurse` saying . I've accepted Homam's answer. I'd just like to add/sh...
Recursive referencing the same class
Recursive referencing the same class In my case I stared to use ServiceStack... I created a class on the output of servicestack via rest --> I get this ``` {"aText":"String","d":{"aText":"String","d":...
- Modified
- 6 Jan at 17:21
Linq extension method, how to find child in collection recursive
Linq extension method, how to find child in collection recursive I'm already familiar with Linq but have little understanding of extension methods I'm hoping someone can help me out. So I have this hi...
- Modified
- 8 Oct at 19:47
Why doesn't .NET/C# optimize for tail-call recursion?
Why doesn't .NET/C# optimize for tail-call recursion? I found [this question](https://stackoverflow.com/questions/340762/which-languages-support-tail-recursion-optimization) about which languages opti...
- Modified
- 23 May at 12:17
Recursive LINQ query: select item and all children with subchildren
Recursive LINQ query: select item and all children with subchildren Is there any way to write a LINQ (or procedural style) query, that can select an item and all children with one query? I have entity...
How do I convert a doubly recursive method to a loop?
How do I convert a doubly recursive method to a loop? Here is my simplified doubly recursive method. It does nothing useful, but illustrates the required recursive invocations: ``` void Main() { Tes...
Renci SSH.NET: Is it possible to create a folder containing a subfolder that does not exist
Renci SSH.NET: Is it possible to create a folder containing a subfolder that does not exist I am currently using Renci SSH.NET to upload files and folders to a Unix Server using SFTP, and creating dir...
Find number of files with a specific extension, in all subdirectories
Find number of files with a specific extension, in all subdirectories Is there a way to find the number of files of a specific type without having to loop through all results inn a Directory.GetFiles(...
C# implementation of deep/recursive object comparison in .net 3.5
C# implementation of deep/recursive object comparison in .net 3.5 I am looking for a C# specific , open source (or source code available) implementation of recursive, or deep, object comparison. I cur...
- Modified
- 8 Oct at 20:10
What is the correct way to use async/await in a recursive method?
What is the correct way to use async/await in a recursive method? What is the correct way to use async/await in a recursive method? Here is my method: ``` public string ProcessStream(string streamPosi...
- Modified
- 29 Jul at 06:6
How to do recursive descent of json using json.net?
How to do recursive descent of json using json.net? I am trying to parse a json file using json.net. The file looks like this I am trying to recurse down this structure processing all objects with a T...
- Modified
- 17 Jul at 06:6
Is there a way to make this slideshow move automatically?
Is there a way to make this slideshow move automatically? This is the slideshow that we used: [http://www.littlewebthings.com/projects/blinds/](http://www.littlewebthings.com/projects/blinds/) and thi...
- Modified
- 25 Nov at 08:19
LINQ recursion function?
LINQ recursion function? Let's take this n-tier deep structure for example: If I am looking to get a particular Item by ID (anywhere in the structure) is there some LINQ goodness I can use t
List files recursively in Linux CLI with path relative to the current directory
List files recursively in Linux CLI with path relative to the current directory This is similar to [this question](https://stackoverflow.com/questions/105212/linux-recursively-list-all-files-in-a-dire...
Stop the recursion completely when returning something
Stop the recursion completely when returning something I do recursion to find a long value within a List with multiple children that also can have children. following method: ``` public TaxonomyData g...
Recursion with yield return elements order in tree
Recursion with yield return elements order in tree I have a recursive function that returns all subtree nodes, given the starting root node. For the following tree structure: ``` A | +--B | +--C | | |...
- Modified
- 3 Feb at 10:3
Detect Recursive calls in C# code
Detect Recursive calls in C# code I want to find all recursive calls in my code. If I open file in Visual Studio, I get "Recursive call" icon on left side of Editor. ![enter image description here](ht...
- Modified
- 6 Aug at 12:21
Is recursion ever faster than looping?
Is recursion ever faster than looping? I know that recursion is sometimes a lot cleaner than looping, and I'm not asking anything about when I should use recursion over iteration, I know there are lot...
- Modified
- 25 Oct at 00:32
What is a catamorphism and can it be implemented in C# 3.0?
What is a catamorphism and can it be implemented in C# 3.0? I'm trying to learn about catamorphisms and I've read [the Wikipedia article](http://en.wikipedia.org/wiki/Catamorphism) and the first coupl...
- Modified
- 15 Sep at 17:3
How do I break out of a loop in Scala?
How do I break out of a loop in Scala? How do I break out a loop? How do I turn nested for loops in
- Modified
- 2 Nov at 22:35
Factorial using Recursion in Java
Factorial using Recursion in Java I am learning Java using the book Java: The Complete Reference. Currently I am working on the topic Recursion. There are similar questions on stackoverflow. I searche...
Is it possible to implement a recursive "SelectMany"?
Is it possible to implement a recursive "SelectMany"? As we all know, `Enumerable.SelectMany` flattens a sequence of sequences into a single sequence. What if we wanted a method that could flatten seq...