From 2d847c4a0e8a6fc84ebddf98800acd72bb592df5 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Mon, 20 Nov 2023 17:23:23 -0500 Subject: [PATCH] no output yet --- hws/09_tiktok_trends/README.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/hws/09_tiktok_trends/README.md b/hws/09_tiktok_trends/README.md index 3e55f4a..235e814 100644 --- a/hws/09_tiktok_trends/README.md +++ b/hws/09_tiktok_trends/README.md @@ -190,17 +190,7 @@ and you can visit this page via [https://www.tiktok.com/tag/cleantok](https://ww ## Output File Format -All expected output files are provided. Among all the five operations mentioned above, only the *display a comment* operation would trigger a write to the output file. - -When displaying the comments, we need to consider the displaying order of the comments. The rules are: - -1. existing comments: comments which are included in **the json file** are existing comments. And when displaying existing comments, a parent comment should be displayed (i.e., printed to the output file) before its children comments are displayed (i.e., printed to the output file). Two children comments which have the same parent should stay in the order as they are in **the json file**. For example, both A and B are existing commens, if comment A appears in line 1 of **the json file**, and comment B appears in line 4 of **the json file**, then comment A should be displayed (i.e., printed to the output file) before comment B is displayed (i.e., printed to the output file). Also, two comments which are both responses to the original video, should stay in the same order as they appear in **the json file**. -2. newly added comments: for newly added comments, a parent comment should be displayed (i.e., printed to the output file) before its children comments are displayed (i.e., printed to the output file). Two children comments who have the same parent should stay in the same order as they are in **the second input file**. -3. if a newly added comment is a reply to an existing comment, then it should be displayed right below that existing comment. -4. if a newly added comment is a response to the original video, then this newly added comment should be displayed at the very bottom; in other words, it should be displayed after all existing comments are displayed. -5. if two newly added comments, let's say A and B, both are responses to the original video, then both A and B should be displayed at the very bottom; but the order between A and B themselves, should stay the same as they appear in **the second input file**. - -To summarize the rules, in this homework, no sorting is needed, but you need to make sure that a newly added comment should always be below its all existing siblings. +to be added. ## Useful Code