File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,8 @@ function addCompanyProblems(sortMethod: string) {
172
172
solutions . forEach ( solution => {
173
173
const row = table . insertRow ( - 1 ) ;
174
174
row . insertCell ( 0 ) . innerText = solution . id . toString ( ) ;
175
- row . insertCell ( 1 ) . innerText = solution . difficulty ?. toString ( ) || 'N/A' ; // New column for difficulty
175
+ const difficultyText = solution . difficulty === 1 ? 'Easy' : solution . difficulty === 2 ? 'Medium' : 'Hard' ;
176
+ row . insertCell ( 1 ) . innerText = difficultyText || 'N/A' ;
176
177
row . insertCell ( 2 ) . innerHTML = `<a href="${ solution . url } " target="_blank">${ solution . title } </a>` ;
177
178
row . insertCell ( 3 ) . innerText = ( solution . acceptance ? ( solution . acceptance * 100 ) . toFixed ( 2 ) + '%' : 'N/A' ) ; // New column for acceptance
178
179
// add frequency as a bar
@@ -186,7 +187,6 @@ function addCompanyProblems(sortMethod: string) {
186
187
bar . style . borderRadius = '10px' ;
187
188
frequencyCell . appendChild ( bar ) ;
188
189
}
189
-
190
190
} ) ;
191
191
} ) ;
192
192
}
You can’t perform that action at this time.
0 commit comments