You can also use paired max and min (pmax and pmin) to redefine the order, and then find duplicate rows from the first and last and combine the two results. Although this is a long solution, it may be of interest:
df <- data.frame(a = c(1,1,2,4,3,5,2,1,1,3), b = c(4,3,3,1,2,2,4,4,4,2), d = LETTERS[1:10])
out <- data.frame(a = c(1,2,4,3,1,1,3), b = c(4,3,1,2,4,4,2), d = c('A','C','D','E','H','I','J'))
mx<- with (df, pmax(a,b))
mn<- with (df, pmin(a,b))
df2<- data.frame(mx, mn)
df2
a<- df[duplicated(df2),]
b<- df[duplicated(df2,fromLast = T),]
res<- merge(a,b,all = T)
res<- res[order(res$d),]
res
out
#check
sum (as.character(res$d) !=as.character(out$d) )