0 likes | 20 Views
ud83dude80 Day 3 of our DSA Mastery Series! Stay ahead in your tech career with HeyCoach's expert insights. <br>
E N D
30DAYS DSA ROADMAP Swipeformore>
DAY3 Matíices Rotate Image Diťťiculty–Medium Youaiegivenannxn2Dmatiixiepiesenting an image, iotate the image by 90 degiees (clockwise). Youhavetoiotatetheimagein-place,which means you have to modify the input 2D matiixdiiectly. Example: Input:nums=[[1,2,3],[4,5,6],[7,8,9]] Output:[[7,4,1],[8,5,2],[9,6,3]] Píoblemlink
Spiíal Matíix Diťťiculty–Medium Givenanmxnmatíix,íetuínallelementsof thematíixinspiíaloídeí. Example: Input:nums=[[1,2,3],[4,5,6],[7,8,9]] Output:[1,2,3,6,9,8,7,4,5] Píoblemlink
Spiíal Matíix II Diťťiculty-Medium Givenapositiveintegeín,geneíateannxn matíixfilledwithelementsfíom1ton^2in spiíaloídeí. Example: Input:n=3 Output:[[1,2,3],[8,9,4],[7,6,5]] Píoblemlink
Set Matíix Zeíoes Diťťiculty-Medium Givenanmxnintegeímatíixmatíix,ifan elementis0,setitsentiíeíowandcolumn to0's.Youmustdoitinplace. Example: Input:nums=[[1,1,1],[1,0,1],[1,1,1]] Output:[[1,0,1],[0,0,0],[1,0,1]] Píoblemlink