We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca016f7 commit 95a708eCopy full SHA for 95a708e
README.md
@@ -0,0 +1,26 @@
1
+# Leetcode Daily Challenge Solutions
2
+
3
+This is my attemp to make the coding experience easir for you guys so that you can easily learn what to do in today's leetcode challenge.
4
5
6
+## Preview
7
8
9
+## Todays 31-12-23
10
+```
11
+class Solution {
12
+ public int maxLengthBetweenEqualCharacters(String s) {
13
+ int msl = -1; // maximum substring length
14
+ HashMap<Character, Integer> m = new HashMap<>();
15
+ for( int i = 0; i < s.length(); i++){
16
+ if( m.containsKey(s.charAt(i))){
17
+ msl = Math.max( msl, i - m.get(s.charAt(i)));
18
+ }
19
+ else{
20
+ m.put(s.charAt(i), i+1);
21
22
23
+ return msl;
24
25
+}
26
0 commit comments