Both are action comedies about detectives and fun teamwork. The comedy to action ratio is about the same in both, so they are both hilarious to watch (for the most part).
Both about bullying, and have the students "judge" and decide who the perpetrators are. 35 sai no Koukousei is a bit more dark though, but I think that's just because jdramas about bullying tend to be more deep.