You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the need of the program, we'll just have to compare the lines.
The algorithm have three steps:
First, read the history_version file and build a map, the map is a map of string to int. The string represents the md5 of the line and the int is the line number (row number).
Then, read the current_version and read the rows, if it has appeared in the history_version, give it a line number. Due to the problem of "duplicate lines", we'll just have to do the second step synced with the first step.
We'll have to build an LIS array, so we'll just have to choose the line number that can generate the maximum LIS, if several numbers simultaneously meet the requirement, we'll just have to select the minimum one(Greedy algorithm).
Second, that is the LIS, don't forget to let the program simultaneously record the path of the LIS.
Third, just can the current_version and output modify out of LIS path.
I'll give a segmentTree interface in the file folder core/algorithm/segmentTree.
The text was updated successfully, but these errors were encountered:
Due to the need of the program, we'll just have to compare the lines.
The algorithm have three steps:
First, read the history_version file and build a map, the map is a map of string to int. The string represents the md5 of the line and the int is the line number (row number).
Then, read the current_version and read the rows, if it has appeared in the history_version, give it a line number. Due to the problem of "duplicate lines", we'll just have to do the second step synced with the first step.
We'll have to build an LIS array, so we'll just have to choose the line number that can generate the maximum LIS, if several numbers simultaneously meet the requirement, we'll just have to select the minimum one(Greedy algorithm).
Second, that is the LIS, don't forget to let the program simultaneously record the path of the LIS.
Third, just can the current_version and output modify out of LIS path.
I'll give a segmentTree interface in the file folder core/algorithm/segmentTree.
The text was updated successfully, but these errors were encountered: