Skip to content
Advertisement

Tag: recursion

Use recursion on array [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question Write a function that by given array of integers, and a positive number X, returns the product of all odd

Trying to recursively hash values in object

friends. I’m trying to write code that hashes all values in a JSON file, regardless of file structure, while preserving the keys and structure. I’m new to javascript, and am having some trouble. My code hashes the values of big and baz, but doesn’t recursively hash the values of cat and bar like I want it to. Ideally, I want

happy number algo question solution not working

trying to figure out this coding problem: Write an algorithm to determine if a number n is “happy”. A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or

Advertisement