I’ve been using Duolingo for years for other languages, so naturally I’m biased when it comes to using it for Japanese. I’d strongly agree with what other people have said though. If you already have a strong foundation for grammar, then Duolingo can be really great for reinforcing and revising that. I’ve definitely found it a huge help for going over a lot of grammar that I couldn’t remember how to use. But if you’re using it to learn Japanese unsupported (without any other resources), then you’re going to struggle. The number of times I’ve wrote paragraphs explaining to people the difference between に and で, or explaining what は actually is, is ridiculous. I’ve been using Duolingo to learn Korean, and I can tell you, without any supporting texts, it is stupidly difficult and impracticable. That being said, when it comes to learning/practicing scripts, it is actually pretty efficient (again, I can only speak for the Hangul and Cyrillic scripts, not Kana or Kanji). If you’re learning languages with similar grammar to languages you already know, then Duolingo is pretty great.
As for Memrise, I only use it for other languages so I don’t know what the Japanese courses are like. I’d imagine it’d have similar problems as Duolingo with grammar explanations, if not worse given that there aren’t even any comments. Memrise is much better for vocab anyway, being more similar to Anki. When it comes to Memrise vs Anki, that really depends on personal preference. A lot of people like the clean, easy-to-use UI of Memrise, but then a lot of people (including me) prefer the power and customization of Anki (sort of like iOS vs Android).
tl;dr:
Duolingo - Great for sentence/grammar practice, bad for learning.
Memrise - Great for vocab learning, bad for sentences and grammar.
Anki - Great for vocab learning, bad for sentences and grammar.