Xiaoliji's Blog

小里脊的个人博客


  • Home

  • Categories

  • Tags

  • Archives

  • About

  • Search

371. Sum of Two Integers - Python

Posted on 2018-09-07   |   Updated on 2019-03-21 | In 算法 | | Visitors

不用加减乘除做加法

剑指Offer中也出现过此题,此篇文章着重分析一下为什么Python需要做一些多余的操作。

Read more »

LeetCode算法题整理(sql篇)sql

Posted on 2018-08-31   |   Updated on 2018-09-01 | In sql | | Visitors

595. Big Countries

查询’大城市’。原题

Read more »

Python排序算法

Posted on 2018-08-17   |   Updated on 2020-10-20 | In 算法 | | Visitors

快速排序

Read more »

LeetCode算法题整理(二叉树篇)Tree

Posted on 2018-08-14   |   Updated on 2022-08-24 | In 算法 | | Visitors

树的定义

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None def rangeSumBST(self, root: TreeNode, low: int, high: int) -> int:
ans = 0
if root:
if low <= root.val <= high:
ans += root.val
ans += self.rangeSumBST(root.left, low, high)
ans += self.rangeSumBST(root.right, low, high)
elif root.val < low:
ans += self.rangeSumBST(root.right, low, high)
else:
ans += self.rangeSumBST(root.left, low, high)
return ans
self.right = None
Read more »

LeetCode算法题整理(动态规划篇)Danymic Programming

Posted on 2018-08-14   |   Updated on 2023-03-20 | In 算法 | | Visitors

70. Climbing Stairs

爬楼梯,一次可以爬一阶或两阶楼梯,爬上n阶楼梯有多少种方法?原题

Read more »

LeetCode算法题整理(数学篇)Math

Posted on 2018-08-12   |   Updated on 2021-06-04 | In 算法 | | Visitors

7. Reverse Integer

倒置一个整数, 此答案忽略了原题中的范围判断。原题

1
2
Input: -123
Output: -321
Read more »

hexo搭建遇到的问题及优化

Posted on 2018-08-09   |   Updated on 2018-09-02 | In Hexo | | Visitors

前言

终于有了一个整理自己学习笔记的地方了,之前用过印象笔记,觉得它的markdown格式处理得不是很完美,复制粘贴出来总是格式不对。后来又用过jupyter_nootboke,但是不方便在其它客户端查看。

Read more »

Hello World

Posted on 2018-08-08   |   Updated on 2018-08-09 | | Visitors

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Read more »
上一页123
xiaoliji

xiaoliji

38 posts
12 categories
33 tags
GitHub HackerRank LeetCode 简书
© 2023 xiaoliji
本站访客数:
Powered by Hexo
Theme - NexT.Mist
博客全站共232.9k字