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) {
172172 solutions . forEach ( solution => {
173173 const row = table . insertRow ( - 1 ) ;
174174 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' ;
176177 row . insertCell ( 2 ) . innerHTML = `<a href="${ solution . url } " target="_blank">${ solution . title } </a>` ;
177178 row . insertCell ( 3 ) . innerText = ( solution . acceptance ? ( solution . acceptance * 100 ) . toFixed ( 2 ) + '%' : 'N/A' ) ; // New column for acceptance
178179 // add frequency as a bar
@@ -186,7 +187,6 @@ function addCompanyProblems(sortMethod: string) {
186187 bar . style . borderRadius = '10px' ;
187188 frequencyCell . appendChild ( bar ) ;
188189 }
189-
190190 } ) ;
191191 } ) ;
192192}
You can’t perform that action at this time.
0 commit comments