recursion-tree-visualizer icon indicating copy to clipboard operation
recursion-tree-visualizer copied to clipboard

Global Variables Not Working.

Open sxmbaka opened this issue 2 years ago • 3 comments

The input field for global variables is not working. Pease fix it.

sxmbaka avatar May 13 '23 04:05 sxmbaka

Can you give some example?

brpapa avatar May 13 '23 13:05 brpapa

image

The input fields are not responding.

sxmbaka avatar May 15 '23 04:05 sxmbaka

I've got the same issue when I set a global variable and increment it. Please fix it,

Example: global variables:

nums = [1 ,2] i = 0

def fn():
  if i >= len(nums):
    return
  i += 1
  fn()
  fn()
  i  -= 1

For solving the problem I use arrays for example

global variables:

nums = [1 ,2] count = []

def fn(n):
  if len(count) >= len(nums):
    return
  count.append(None)
  fn(n)
  fn(n)
  count.pop()

orhanerday avatar Aug 29 '23 07:08 orhanerday