mirror of
https://github.com/krahets/hello-algo.git
synced 2026-02-03 19:03:42 +08:00
Improve Python code for importing modules.
This commit is contained in:
@@ -4,10 +4,11 @@ Created Time: 2022-12-01
|
||||
Author: Peng Chen (pengchzn@gmail.com)
|
||||
"""
|
||||
|
||||
import sys, os.path as osp
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))
|
||||
from modules import *
|
||||
sys.path.append(str(Path(__file__).parent.parent))
|
||||
from modules import ListNode
|
||||
|
||||
|
||||
class LinkedListQueue:
|
||||
|
||||
@@ -4,10 +4,11 @@ Created Time: 2022-11-29
|
||||
Author: Peng Chen (pengchzn@gmail.com)
|
||||
"""
|
||||
|
||||
import sys, os.path as osp
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))
|
||||
from modules import *
|
||||
sys.path.append(str(Path(__file__).parent.parent))
|
||||
from modules import ListNode
|
||||
|
||||
|
||||
class LinkedListStack:
|
||||
|
||||
Reference in New Issue
Block a user