leetcode with python:1. Two Sum

从今天起在此纪录用python写leetcode的心路历程 希望能以一天两三题的速率下去更新 让自己的程式更加精进 题目: Given an array of integers nums and an integer target
leetcode with python:9. Palindrome Number

题目: Given an integer x, return true if x is palindrome integer. An integer is a palindrome when it reads the same backward as forward. 前后开始读都一样的数字称为palindrome(ex:121),而题
leetcode with python:13. Roman to Integer

题目: Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol: Value I: 1 V: 5 X: 10 L: 50 C: 100 D: 500 M: 1000 For example, 2 is written as II in Roman numeral, ju
leetcode with python:14. Longest Common Prefix

题目: Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string . 给定一个字串阵列,求出他们的 longest co
Validating data received via the Web App by PHP

function buildDataCheckString(array $init_data): string { ksort($init_data); $data_check_array = []; foreach ($init_data as $key = $val) { $data_check_array[] = {$key}={$val}; } return implode(\n, $dat
leetcode with python:20. Valid Parentheses

题目: Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same ty
leetcode with python:21. Merge Two Sorted Lists

题目: You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two lists. Retu