2 questions from the last 7 days
2
votes
1
answer
62
views
How can I validate recursive Pydantic models where the validation rules depend on dynamic nesting depth?
I'm building a FastAPI application and modeling a forum-style comment system using Pydantic v2.
Each comment can contain replies, and those replies can contain more replies, recursively, similar to ...
-1
votes
0
answers
36
views
Understanding Time Complexity and Space Complexity in Recursive Algorithms [closed]
I am trying to analyze and optimize recursive algorithms, particularly with regards to their time and space complexity. I have written a recursive solution for the Fibonacci sequence and a merge sort ...