Skip to main content
Rollback to Revision 5
Source Link
pacmaninbw
  • 26.2k
  • 13
  • 47
  • 114
int cycle_head(int *perm, int idx) {
    int i = perm[idx]
    int j = i
    while (1) {
        j = perm[j]
        if (j == i) return 1
        if (j < i) return 0
    }
}
int cycle_head(int *perm, int idx) {
    int i = perm[idx]
    int j = i
    while (1) {
        j = perm[j]
        if (j == i) return 1
        if (j < i) return 0
    }
}
int cycle_head(int *perm, int idx) {
    i = perm[idx]
    j = i
    while (1) {
        j = perm[j]
        if (j == i) return 1
        if (j < i) return 0
    }
}
added 8 characters in body
Source Link
int cycle_head(int *perm, int idx) {
    int i = perm[idx]
    int j = i
    while (1) {
        j = perm[j]
        if (j == i) return 1
        if (j < i) return 0
    }
}
int cycle_head(int *perm, int idx) {
    i = perm[idx]
    j = i
    while (1) {
        j = perm[j]
        if (j == i) return 1
        if (j < i) return 0
    }
}
int cycle_head(int *perm, int idx) {
    int i = perm[idx]
    int j = i
    while (1) {
        j = perm[j]
        if (j == i) return 1
        if (j < i) return 0
    }
}
edited tags
Link
pacmaninbw
  • 26.2k
  • 13
  • 47
  • 114
added 14 characters in body
Source Link
Loading
edited tags
Source Link
Loading
update wording
Source Link
Loading
Source Link
Loading