2496
2496
< a href ="https://leetcodehelp.github.io/2448.html "> 2448. Minimum Cost to Make Array Equal</ a >
2497
2497
< a href ="https://leetcodehelp.github.io/2449.html "> 2449. Minimum Number of Operations to Make Arrays Similar</ a >
2498
2498
< a href ="https://leetcodehelp.github.io/2450.html "> 2450. Number of Distinct Binary Strings After Applying Operations</ a >
2499
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2451.html "> 2451. Leetcode</ a > </ p >
2500
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2452.html "> 2452. Leetcode</ a > </ p >
2501
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2453.html "> 2453. Leetcode</ a > </ p >
2502
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2454.html "> 2454. Leetcode</ a > </ p >
2503
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2455.html "> 2455. Leetcode</ a > </ p >
2504
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2456.html "> 2456. Leetcode</ a > </ p >
2505
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2457.html "> 2457. Leetcode</ a > </ p >
2506
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2458.html "> 2458. Leetcode</ a > </ p >
2507
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2459.html "> 2459. Leetcode</ a > </ p >
2508
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2460.html "> 2460. Leetcode</ a > </ p >
2509
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2461.html "> 2461. Leetcode</ a > </ p >
2510
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2462.html "> 2462. Leetcode</ a > </ p >
2511
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2463.html "> 2463. Leetcode</ a > </ p >
2512
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2464.html "> 2464. Leetcode</ a > </ p >
2513
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2465.html "> 2465. Leetcode</ a > </ p >
2514
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2466.html "> 2466. Leetcode</ a > </ p >
2515
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2467.html "> 2467. Leetcode</ a > </ p >
2516
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2468.html "> 2468. Leetcode</ a > </ p >
2517
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2469.html "> 2469. Leetcode</ a > </ p >
2518
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2470.html "> 2470. Leetcode</ a > </ p >
2519
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2471.html "> 2471. Leetcode</ a > </ p >
2520
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2472.html "> 2472. Leetcode</ a > </ p >
2521
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2473.html "> 2473. Leetcode</ a > </ p >
2522
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2474.html "> 2474. Leetcode</ a > </ p >
2523
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2475.html "> 2475. Leetcode</ a > </ p >
2524
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2476.html "> 2476. Leetcode</ a > </ p >
2525
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2477.html "> 2477. Leetcode</ a > </ p >
2526
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2478.html "> 2478. Leetcode</ a > </ p >
2527
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2479.html "> 2479. Leetcode</ a > </ p >
2528
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2480.html "> 2480. Leetcode</ a > </ p >
2529
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2481.html "> 2481. Leetcode</ a > </ p >
2530
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2482.html "> 2482. Leetcode</ a > </ p >
2531
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2483.html "> 2483. Leetcode</ a > </ p >
2532
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2484.html "> 2484. Leetcode</ a > </ p >
2533
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2485.html "> 2485. Leetcode</ a > </ p >
2534
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2486.html "> 2486. Leetcode</ a > </ p >
2535
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2487.html "> 2487. Leetcode</ a > </ p >
2536
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2488.html "> 2488. Leetcode</ a > </ p >
2537
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2489.html "> 2489. Leetcode</ a > </ p >
2538
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2490.html "> 2490. Leetcode</ a > </ p >
2539
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2491.html "> 2491. Leetcode</ a > </ p >
2540
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2492.html "> 2492. Leetcode</ a > </ p >
2541
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2493.html "> 2493. Leetcode</ a > </ p >
2542
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2494.html "> 2494. Leetcode</ a > </ p >
2543
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2495.html "> 2495. Leetcode</ a > </ p >
2544
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2496.html "> 2496. Leetcode</ a > </ p >
2545
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2497.html "> 2497. Leetcode</ a > </ p >
2546
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2498.html "> 2498. Leetcode</ a > </ p >
2547
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2499.html "> 2499. Leetcode</ a > </ p >
2548
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2500.html "> 2500. Leetcode</ a > </ p >
2549
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2501.html "> 2501. Leetcode</ a > </ p >
2550
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2502.html "> 2502. Leetcode</ a > </ p >
2551
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2503.html "> 2503. Leetcode</ a > </ p >
2552
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2504.html "> 2504. Leetcode</ a > </ p >
2553
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2505.html "> 2505. Leetcode</ a > </ p >
2554
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2506.html "> 2506. Leetcode</ a > </ p >
2555
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2507.html "> 2507. Leetcode</ a > </ p >
2556
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2508.html "> 2508. Leetcode</ a > </ p >
2557
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2509.html "> 2509. Leetcode</ a > </ p >
2558
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2510.html "> 2510. Leetcode</ a > </ p >
2559
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2511.html "> 2511. Leetcode</ a > </ p >
2560
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2512.html "> 2512. Leetcode</ a > </ p >
2561
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2513.html "> 2513. Leetcode</ a > </ p >
2562
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2514.html "> 2514. Leetcode</ a > </ p >
2563
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2515.html "> 2515. Leetcode</ a > </ p >
2564
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2516.html "> 2516. Leetcode</ a > </ p >
2565
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2517.html "> 2517. Leetcode</ a > </ p >
2566
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2518.html "> 2518. Leetcode</ a > </ p >
2567
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2519.html "> 2519. Leetcode</ a > </ p >
2568
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2520.html "> 2520. Leetcode</ a > </ p >
2569
+ < p style ="font-size:20px "> < a href ="https://leetcodehelp.github.io/2521.html "> 2521. Leetcode</ a > </ p >
2570
+
2499
2571
2500
2572
2501
2573
2512
2584
2513
2585
< h2 > LeetCode Solutions</ h2 >
2514
2586
< div style ="background-color: white; ">
2515
- < a href ="https://leetcode.com/problems/two-sum " target ="_blank " style ="color: black; font-size: 20px; "> 1. Two Sum</ a >
2516
- < p > Time: O(n)</ p >
2587
+
2588
+ < a href ="https://leetcode.com/problems/two-sum " target ="_blank " style ="color: black; font-size: 20px; ">
2589
+ 1. Two Sum </ a >
2590
+ < p > Time: O(n)</ p >
2517
2591
< p > Space: O(n)</ p >
2518
2592
</ div >
2519
2593
@@ -2525,44 +2599,42 @@ <h2>LeetCode Solutions</h2>
2525
2599
Copy
2526
2600
</ button >
2527
2601
< pre >
2528
- < code id ="p1 " class ="language-c++ " >
2529
- class Solution {
2530
- public:
2531
- vector< int > twoSum(vector< int > & nums, int target) {
2532
- unordered_map< int , int > numToIndex;
2533
-
2534
- for (int i = 0; i < nums .size(); ++i) {
2535
- if (numToIndex.count(target - nums[i]))
2536
- return {numToIndex[target - nums[i]], i};
2537
- numToIndex[nums[i]] = i;
2538
- }
2539
-
2540
- throw;
2541
- }
2542
- };
2543
-
2602
+ < code id ="p1 " class ="language-c++ " style ="font-size: 20px; ">
2603
+ class Solution {
2604
+ public:
2605
+ vector<int> twoSum(vector<int>& nums, int target) {
2606
+ unordered_map<int, int> numToIndex;
2607
+
2608
+ for (int i = 0; i < nums.size(); ++i) {
2609
+ if (numToIndex.count(target - nums[i]))
2610
+ return {numToIndex[target - nums[i]], i};
2611
+ numToIndex[nums[i]] = i;
2612
+ }
2613
+
2614
+ throw;
2615
+ }
2616
+ };
2544
2617
</ code >
2545
2618
</ pre >
2546
2619
< button class ="btn-lan "> Java</ button >
2547
2620
< button class ="btn " onclick ="copyToClipboard('#p2') " >
2548
2621
Copy
2549
2622
</ button >
2550
- < pre >
2551
- < code class ="java " id ="p2 ">
2623
+ < pre >
2624
+ < code class ="java " id ="p2 " style =" font-size: 20px; " >
2552
2625
class Solution {
2553
2626
public int[] twoSum(int[] nums, int target) {
2554
- Map< Integer , Integer > numToIndex = new HashMap< > ();
2627
+ Map< Integer, Integer> numToIndex = new HashMap<> ();
2555
2628
2556
- for (int i = 0; i < nums .length; ++i) {
2629
+ for (int i = 0; i < nums.length; ++i) {
2557
2630
if (numToIndex.containsKey(target - nums[i]))
2558
2631
return new int[] {numToIndex.get(target - nums[i]), i};
2559
2632
numToIndex.put(nums[i], i);
2560
2633
}
2561
2634
2562
2635
throw new IllegalArgumentException();
2563
2636
}
2564
- }
2565
-
2637
+ }
2566
2638
</ code >
2567
2639
</ pre >
2568
2640
< button class ="btn-lan "> Python</ button >
@@ -2572,7 +2644,7 @@ <h2>LeetCode Solutions</h2>
2572
2644
2573
2645
2574
2646
< pre >
2575
- < code id ="p3 "class ="language-python ">
2647
+ < code id ="p3 "class ="language-python " style =" font-size: 20px; " >
2576
2648
class Solution:
2577
2649
def twoSum(self, nums: List[int], target: int) -> List[int]:
2578
2650
numToIndex = {}
@@ -2633,4 +2705,4 @@ <h2>LeetCode Solutions</h2>
2633
2705
2634
2706
</ body >
2635
2707
</ html >
2636
-
2708
+
0 commit comments