Leetcode[141] Linked List Cycle

Difficulty

  • Level: Easy
  • Acceptance: 42.6%

Solution

Time Complexity: O(n), Space Complexity: O(n)

Analysis

I used a set in my solution as sets are great with dealing with large amounts of data in comparison to an array, good for searching, and great for unique values.

I have a passion for coding.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store