Skip to content

Commit c17e095

Browse files
Update 0091-decode-ways.java
Removed unused dp array for the optimal solution.
1 parent 5f4f024 commit c17e095

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

java/0091-decode-ways.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
class Solution {
33

44
public int numDecodings(String s) {
5-
int[] dp = new int[s.length() + 1];
65
int twoBack = 1; // empty string
76
int oneBack = s.charAt(0) == '0' ? 0 : 1;
87
int current = oneBack;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy