Questions tagged [depth]

The depth of a node in a tree is the length of the path to its root. The depth of an image is the number of bits used to indicate the color of a single pixel.

The depth of a node in a tree is the length of the path to its root. The depth of the tree is the maximum depth of all nodes.

See also:


The depth of an image is the number of bits used to indicate the color of a single pixel.

See also:

742 questions
-2
votes
2 answers

What is the size above depth of BST

This is what I have so far. I need to computes the size of the tree above at depth k. public static int above(Node t, int k) { if (t == null) { return 0; } if (t.key > k) return (above(t.left, k - 1) + above(t.right, k - 1) + 1); …
yummyyenni
  • 23
  • 7
-2
votes
2 answers

Maximum Recursion depth exceeded: Code Academy; Taking a Vacation 5/7

I'm making a model for vacation costs in a code academy exercise, and I have three functions defined so far, rental_car_costs with the argument days, hotel_cost with the argument nights, and plane_ride_cost with the argument of city. The code looks…
-2
votes
3 answers

ActionScript Measuring 3D Depth

i'm having a difficult time understanding how to control the z property of display objects in a 3D space. i know how depth works, but what i don't understand is how i can get the maximum depth, or the number at which the display object just…
Chunky Chunk
  • 16,553
  • 15
  • 84
  • 162
-2
votes
2 answers

Flask Max Recursion Depth

I have a max recursion depth error that is driving me nuts In the flask __init__.py file I have: @app.route('/vpcs') @app.route('/vpcs/') def getVPCs(vpc=False): """ Get the vpcs. """ results = getVPCs() return…
Simply Seth
  • 3,246
  • 17
  • 51
  • 77
-2
votes
1 answer

Perl Regex to be used in order comment out irrelevant code with many level of nesting

I am trying to comment out all the preprocessing instructions of the type: if LABEL do something else do something else end You have to provide a list of LABELS to the script so that it only comments out the line containing that "if"…
progLearner
  • 123
  • 10
-3
votes
3 answers

How to find the depth of an unlimited depthed array

I am trying to find out the depth of a multi dimension array. The array is unlimited one (depth). I would like to find out the maximum depth of the array. Please see the array structure below Array ( [0] => Array ( [id] =>…
SunilKumar
  • 17
  • 1
  • 6
-6
votes
1 answer

creating a recursive function to show the depth of numbers of list in dictionary

Design a function depth_map which returns a dictionary whose keys are the depths of the items in and the value for a given key is a list of the items at that depth. The depth of an object in a nested list is the number of nested lists,enclosing…
1 2 3
49
50