This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NoRepeatSubstring { | |
public static int findLength(String str) { | |
int windowStart = 0, maxLength = 0; | |
Map<Character, Integer> charIndexMap = new HashMap<>(); | |
// try to extend the range [windowStart, windowEnd] | |
for (int windowEnd = 0; windowEnd < str.length(); windowEnd++) { | |
char rightChar = str.charAt(windowEnd); | |
// if the map already contains the 'rightChar', shrink the window from the beginning so that | |
// we have only one occurrence of 'rightChar' | |
if (charIndexMap.containsKey(rightChar)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution { | |
public ListNode addTwoNumbers(ListNode l1, ListNode l2) { | |
return addNumbersHelper(l1, l2, 0); | |
} | |
public ListNode addNumbersHelper(ListNode l1, ListNode l2, int carry) { | |
if(l1 == null && l2 == null && carry == 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 Johannes Homeier | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Action On Incoming" : "{\n \"cancelButtonLabel\" : \"Cancel\",\n \"setNewActionConfigLabel\" : \"Set New Action Configuration\",\n \"action1DescriptionLabel\" : \"(e.g. Existing contact sends you sms, you can create case or task using that sms automatically)\",\n \"action2Label\" : \" Action 2 : If senders mobile number is unknown\",\n \"createTaskLabel\" : \"Create Task\",\n \"actionOnIncomingTitleLabel\" : \"Create new action on incoming SMS\",\n \"nameLabel\" : \"Name\",\n \"createCaseLabel\" : \"Create Case\",\n \"createOpportunityLabel\" : \"Create Opportunity\",\n \"saveButtonLabel\" : \"Save\",\n \"doNothingLabel\" : \"Do Nothing\",\n \"createContactLabel\" : \"Create Contact\",\n \"configureActionDescriptionLabel\" : \"When Incoming SMS is received in your org, You can configure following actions,\",\n \"action1Label\" : \"Action 1: If senders mobile number is already stored in some Objects Record\",\n \"helpLabel\" : \"Help for this page ?\",\n \"createLeadLabel\" : \"Create Lead |