Beta
Normalizing State Shape #1
13PrVille
Loading description...
Data Structures
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
The random tests reject my solution despite the output being identical to the expected one, the only difference being the ordering of items in the objects and the arrays. Am I missing something? Has anyone encountered a similar issue?
Random tests keep generating datasets where authors with the same
username
have different names in the same dataset:user6
has 3 different names in the same object.Fixed!
Some things are not clear from description:
You mean
allIds
.Added clarifications and changed the structure of the
authorPosts
state to be simpler.The authors state consists of all the authors, posts and comments.
The order of the elements are based on the ordering of the
allIds
arrays. The ordering for them is in order of appearance. If you mean ordering in thebyId
objects, this doesn't obviously matter since they are look-up tables.The
authorPosts
state is now just simply and array of postIds for a user.I updated the description to address all of these points.