skl/skl.go
func (s *Skiplist) findLast() *node {
	n := s.head
	level := int(s.getHeight()) - 1
	for {
		next := s.getNext(n, level)
		if next != nil {
			n = next
			continue
		}
		if level == 0 {
			if n == s.head {
				return nil
			}
			return n
		}
		level--
	}
}
func (s *Skiplist) findLast() *node {
	n := s.head
	level := int(s.getHeight()) - 1
	for {
		next := s.getNext(n, level)
		if next != nil {
			n = next
			continue
		}
		if level == 0 {
			if n == s.head {
				return nil
			}
			return n
		}
		level--
	}
}
func ( s * Skiplist ) findLast ( ) * node { n := s . head level := int ( s . getHeight ( ) ) - 1 for { next := s . getNext ( n , level ) if next != nil { n = next continue } if level == 0 { if n == s . head { return nil } return n } level -- } }
// findLast returns the last element. If head (empty list), we return nil. All the find functions
// will NEVER return the head nodes.
findLast returns the last element . If head ( empty list ) we return nil . All the find functions will NEVER return the head nodes .