DEV Community

Discussion on: Striver's SDE Sheet Journey - #7 Rotate Image

Collapse
 
ashutosh049 profile image
ashutosh049 • Edited

Thanks! Aren't there any more efficient algo for matrix operation? What about Strasen's one. You can check if he proposed some better to quadratic. Not sure about that. How about this(taken from quad trees):

rotate(qt) {
  if ( isValue(qt) )
  return qt
  else return makeQT( rotate(rl(qt)), rotate(ll(qt)),
  rotate(ru(qt)), rotate(lu(qt)) )
}
Enter fullscreen mode Exit fullscreen mode

Quad trees are interesting thing to read.

Collapse
 
sachin26 profile image
sachin26

thanks for sharing about interesting algos. I will read.