upd
This commit is contained in:
@@ -48,7 +48,7 @@ Output: [8,9,9,9,0,0,0,1]
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 2 :lc-lang python3
|
||||
# Definition for singly-linked list.
|
||||
# class ListNode:
|
||||
# def __init__(self, val=0, next=None):
|
||||
@@ -59,7 +59,7 @@ class Solution:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 2
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* struct ListNode {
|
||||
|
||||
@@ -49,7 +49,7 @@ Output: [1]
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 19 :lc-lang python3
|
||||
# Definition for singly-linked list.
|
||||
# class ListNode:
|
||||
# def __init__(self, val=0, next=None):
|
||||
@@ -60,7 +60,7 @@ class Solution:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 19
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* struct ListNode {
|
||||
|
||||
@@ -49,7 +49,7 @@ Output: [0]
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 21 :lc-lang python3
|
||||
# Definition for singly-linked list.
|
||||
# class ListNode:
|
||||
# def __init__(self, val=0, next=None):
|
||||
@@ -60,7 +60,7 @@ class Solution:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 21
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* struct ListNode {
|
||||
|
||||
@@ -61,7 +61,7 @@ Output: []
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 23 :lc-lang python3
|
||||
# Definition for singly-linked list.
|
||||
# class ListNode:
|
||||
# def __init__(self, val=0, next=None):
|
||||
@@ -72,7 +72,7 @@ class Solution:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 23
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* struct ListNode {
|
||||
|
||||
@@ -42,7 +42,7 @@ Output: [3,2,1,4,5]
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 25 :lc-lang python3
|
||||
# Definition for singly-linked list.
|
||||
# class ListNode:
|
||||
# def __init__(self, val=0, next=None):
|
||||
@@ -53,7 +53,7 @@ class Solution:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 25
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* struct ListNode {
|
||||
|
||||
@@ -61,7 +61,7 @@ Output: [[3,null],[3,0],[3,null]]
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 138 :lc-lang python3
|
||||
"""
|
||||
# Definition for a Node.
|
||||
class Node:
|
||||
@@ -76,7 +76,7 @@ class Solution:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 138
|
||||
/*
|
||||
// Definition for a Node.
|
||||
class Node {
|
||||
|
||||
@@ -54,7 +54,7 @@ Explanation: There is no cycle in the linked list.
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 141 :lc-lang python3
|
||||
# Definition for singly-linked list.
|
||||
# class ListNode:
|
||||
# def __init__(self, x):
|
||||
@@ -66,7 +66,7 @@ class Solution:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 141
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* struct ListNode {
|
||||
|
||||
@@ -50,7 +50,7 @@ Output: [1,5,2,4,3]
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 143 :lc-lang python3
|
||||
# Definition for singly-linked list.
|
||||
# class ListNode:
|
||||
# def __init__(self, val=0, next=None):
|
||||
@@ -64,7 +64,7 @@ class Solution:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 143
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* struct ListNode {
|
||||
|
||||
@@ -54,7 +54,7 @@ lRUCache.get(4); // return 4
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 146 :lc-lang python3
|
||||
class LRUCache:
|
||||
|
||||
def __init__(self, capacity: int):
|
||||
@@ -74,7 +74,7 @@ class LRUCache:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 146
|
||||
class LRUCache {
|
||||
public:
|
||||
LRUCache(int capacity) {
|
||||
|
||||
@@ -45,7 +45,7 @@ Output: []
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 206 :lc-lang python3
|
||||
# Definition for singly-linked list.
|
||||
# class ListNode:
|
||||
# def __init__(self, val=0, next=None):
|
||||
@@ -56,7 +56,7 @@ class Solution:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 206
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* struct ListNode {
|
||||
|
||||
@@ -57,13 +57,13 @@ Follow up:
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 287 :lc-lang python3
|
||||
class Solution:
|
||||
def findDuplicate(self, nums: List[int]) -> int:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 287
|
||||
class Solution {
|
||||
public:
|
||||
int findDuplicate(vector<int>& nums) {
|
||||
|
||||
@@ -47,7 +47,7 @@ The input has been split into consecutive parts with size difference at most 1,
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 725 :lc-lang python3
|
||||
# Definition for singly-linked list.
|
||||
# class ListNode:
|
||||
# def __init__(self, val=0, next=None):
|
||||
@@ -58,7 +58,7 @@ class Solution:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 725
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* struct ListNode {
|
||||
|
||||
@@ -57,7 +57,7 @@ browserHistory.back(7); // You are in "google.com", you can mo
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 1472 :lc-lang python3
|
||||
class BrowserHistory:
|
||||
|
||||
def __init__(self, homepage: str):
|
||||
@@ -81,7 +81,7 @@ class BrowserHistory:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 1472
|
||||
class BrowserHistory {
|
||||
public:
|
||||
BrowserHistory(string homepage) {
|
||||
|
||||
@@ -38,7 +38,7 @@ Output: [7,9,6,6,8,7,3,0,9,5]
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 1721 :lc-lang python3
|
||||
# Definition for singly-linked list.
|
||||
# class ListNode:
|
||||
# def __init__(self, val=0, next=None):
|
||||
@@ -49,7 +49,7 @@ class Solution:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 1721
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* struct ListNode {
|
||||
|
||||
@@ -43,7 +43,7 @@ Explanation: Every node has value 1, so no nodes are removed.
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 2487 :lc-lang python3
|
||||
# Definition for singly-linked list.
|
||||
# class ListNode:
|
||||
# def __init__(self, val=0, next=None):
|
||||
@@ -54,7 +54,7 @@ class Solution:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 2487
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* struct ListNode {
|
||||
|
||||
Reference in New Issue
Block a user