Dart Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```dart []\nclass Solution {\n List<int> lastVisitedIntegers(List<int> nums) {\n  List<int> seen = [];\n  List<int> ans = [];\n  int consecutiveNegOneCount = 0;\n\n  for (int num in nums) {\n    if (num != -1) {\n      // Reset consecutive count when a positive integer is found\n      consecutiveNegOneCount = 0;\n      // Prepend positive integer to the front of seen\n      seen.insert(0, num);\n    } else {\n      // Increment the count of consecutive -1s\n      consecutiveNegOneCount++;\n\n      // If k (consecutiveNegOneCount) is within the bounds of seen, add the corresponding element\n      if (consecutiveNegOneCount <= seen.length) {\n        ans.add(seen[consecutiveNegOneCount - 1]);\n      } else {\n        // If k is greater than seen length, add -1 to ans\n        ans.add(-1);\n      }\n    }\n  }\n\n  return ans;\n}\n}\n```
['Dart']