Insertion Sort for Singly Linked List.java Intersection of two arrays.java Intersection of two sorted Linked lists.java Isomorphic Strings.java Kadane's Algorithm.java Key Pair.java Kth Smallest Element.java LCS of three strings.java LRU Cache.java ...
@@ -0,0 +1,22 @@ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: bool hasCycle(ListNode *head) { ...