Consider UCYCLE, the problem of recognizing undirected graphs containing a cycle. On the one hand, it's in LOGSPACE, see this stackexchange thread: start at every vertex $v$ a DFS and check whether it returns to $v$ along a different edge than it left. On the other hand, there are linear-time algorithms in the number of edges: start by the partition of the vertices into singletons, and for each edge merge the corresponding parts if they're different, and return TRUE if they're the same. Maintain the partition using e.g. disjoint-set forests.
My question: is there are linear-time, LOGSPACE algorithm? and, ideally, one that can be implemented [solutions starting by "add an expander graph to $G$" will be accepted, but are not what I am looking for].