gosiqueira / leetcode-ebbinghaus-practice

My Solutions for LeetCode problems schedule according to Ebbinghaus forgetting curve.
MIT License
7 stars 4 forks source link

20 gabrielvictorcf rust linked list solutions #22

Closed gabrielvictorcf closed 1 year ago

gabrielvictorcf commented 1 year ago

This PR closes issue #20 with tested solutions.

Again, we have some answers here that do not have a leetcode counterpart, as their linked list implementation does not allow for cycles or intersections. In these problems, i changed the next node definition to the Option<Rc<RefCell<ListNode>>> type - which'll allow for an implementation on these problems. Likewise, i also implemented some test cases to assert the implementation compiles and works.