diff --git a/00-chartgpt/chainlit/nohup.out b/00-chartgpt/chainlit/nohup.out index 18f97e279d97cc734befd238057a7b16ba11c861..a0b66cc23b76878bbe08a58a5120bbec65c758df 100644 --- a/00-chartgpt/chainlit/nohup.out +++ b/00-chartgpt/chainlit/nohup.out @@ -2,3 +2,7 @@ engine was transferred to model_kwargs. Please confirm that engine is what you intended. 2023-06-21 21:24:02 - Your app is available at http://localhost:8000 +2023-06-21 22:32:31 - WARNING! engine is not default parameter. + engine was transferred to model_kwargs. + Please confirm that engine is what you intended. +2023-06-21 22:32:31 - Your app is available at http://localhost:8000 diff --git "a/14_\345\210\267\351\242\230/problem_solving_03.py" "b/14_\345\210\267\351\242\230/problem_solving_03.py" new file mode 100644 index 0000000000000000000000000000000000000000..5dc2b1280e27f915af5a28722b5d0339f524453e --- /dev/null +++ "b/14_\345\210\267\351\242\230/problem_solving_03.py" @@ -0,0 +1,19 @@ +""" +移除元素 +""" +from typing import List + + +class Solution: + def removeElement(self, nums: List[int], val: int) -> int: + left = 0 + for index in range(0, len(nums)): + if nums[index] != val: + nums[left] = nums[index] + left += 1 + return left + + +if __name__ == '__main__': + result = Solution().removeElement([2], 3) + print(result)