Testcase confusing, should add function createUser()


  • 0

    I use HashMap to store both follow and tweet information, but the testcase somehow gives non existent user and I have to tweek the code for the checks, which is ugly.

    It is better it can provide a createUser() function, so that we can init the HashMap, which is more realistic as well.

    And also, in the testcase, user can follow himeself or unfollow himself, which is even more confusing, actually, the newsfeeds should only contains followees' tweets excluding his own tweets, which make this question more sense.

    I spent lots of time debugging here or there, which wastes time.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.