Skip to content

remove html tag shown in problem description (in terminal) #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ketankr9
Copy link

@ketankr9 ketankr9 commented Feb 10, 2020

fixes skygragon#201 & skygragon#183.
Note: It happened with every problems not just specific ones.

  • leetcode version = 2.6.22

Before this commit

$$$ leetcode show 1331
[1331] Rank Transform of an Array  

https://leetcode.com/problems/rank-transform-of-an-array/description/

* algorithms
* Easy (60.08%)
* Likes:    75
* Dislikes: 3
* Total Accepted:    5.8K
* Total Submissions: 9.6K
* Testcase Example:  '[40,10,20,30]'

<p>Given an array of integers&nbsp;<code>arr</code>, replace each element with its rank.</p>

<p>The rank represents how large the element is. The rank has the following rules:</p>

<ul>
	<li>Rank is an integer starting from 1.</li>
	<li>The larger the element, the larger the rank. If two elements are equal, their rank must be the same.</li>
	<li>Rank should be as small as possible.</li>
</ul>

<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>

<pre>
<strong>Input:</strong> arr = [40,10,20,30]
<strong>Output:</strong> [4,1,2,3]
<strong>Explanation</strong>: 40 is the largest element. 10 is the smallest. 20 is the second smallest. 30 is the third smallest.</pre>

<p><strong>Example 2:</strong></p>

<pre>
<strong>Input:</strong> arr = [100,100,100]
<strong>Output:</strong> [1,1,1]
<strong>Explanation</strong>: Same elements share the same rank.
</pre>

<p><strong>Example 3:</strong></p>

<pre>
<strong>Input:</strong> arr = [37,12,28,9,100,56,80,5,12]
<strong>Output:</strong> [5,3,4,2,8,6,7,1,3]
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>0 &lt;= arr.length &lt;= 10<sup>5</sup></code></li>
	<li><code>-10<sup>9</sup>&nbsp;&lt;= arr[i] &lt;= 10<sup>9</sup></code></li>
</ul>

After this commit

$$$ leetcode show 1331
[1331] Rank Transform of an Array  

https://leetcode.com/problems/rank-transform-of-an-array/description/

* algorithms
* Easy (60.08%)
* Likes:    75
* Dislikes: 3
* Total Accepted:    5.8K
* Total Submissions: 9.6K
* Testcase Example:  '[40,10,20,30]'

Given an array of integers arr, replace each element with its rank.

The rank represents how large the element is. The rank has the following rules:


	Rank is an integer starting from 1.
	The larger the element, the larger the rank. If two elements are equal, their rank must be the same.
	Rank should be as small as possible.


 
Example 1:


Input: arr = [40,10,20,30]
Output: [4,1,2,3]
Explanation: 40 is the largest element. 10 is the smallest. 20 is the second smallest. 30 is the third smallest.

Example 2:


Input: arr = [100,100,100]
Output: [1,1,1]
Explanation: Same elements share the same rank.


Example 3:


Input: arr = [37,12,28,9,100,56,80,5,12]
Output: [5,3,4,2,8,6,7,1,3]


 
Constraints:


	0 <= arr.length <= 10^5
	-10^9 <= arr[i] <= 10^9

@jdneo
Copy link

jdneo commented Feb 27, 2020

@ketankr9 This forked CLI is used as a lib for the VS Code extension. So we reserve the HTML tags to make sure it will be rendered properly in the VS Code's WebView.

I'm closing this PR since this will introduce breaking in the VS Code extension. But, if you can both make the VS Code WebView and the command line show in a proper way, please send out another PR, that would be very great if we can achieve that.

Thanks.

@jdneo jdneo closed this Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Useless html tag shown in problem
2 participants