I love recursion :) It maks implemnetion simple, and elegant.

class Solution {
    bool hasCycle(ListNode *h1, ListNode *h2){
        if(h1 == h2) return true;
        if(h1 == NULL || h2 == NULL) return false;
        if(h2->next == NULL) return false;
        return hasCycle(h1->next,h2->next->next);
    bool hasCycle(ListNode *head) {
        // IMPORTANT: Please reset any member data you declared, as
        // the same Solution instance will be reused for each test case.
        if(head == NULL) return false;
        return hasCycle(head,head->next);