mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

[LeetCode] Problem 434 - Number of Segments in a String

Posted on 2019-08-27 | In Algorithm , LeetCode
Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters. Please note that the string ...
Read more »

[LeetCode] Problem 414 - Third Maximum Number

Posted on 2019-08-27 | In Algorithm , LeetCode
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexi ...
Read more »

[LeetCode] Problem 405 - Convert a Number to Hexadecimal

Posted on 2019-08-27 | In Algorithm , LeetCode
Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used. Note All letters in hexadeci ...
Read more »

[LeetCode] Problem 404 - Sum of Left Leaves

Posted on 2019-08-26 | In Algorithm , LeetCode
Find the sum of all left leaves in a given binary tree. Example12345 3 / \9 20 / \ 15 7 There are two left leaves in the binary tree, with valu ...
Read more »

[LeetCode] Problem 389 - Find the Difference

Posted on 2019-08-26 | In Algorithm , LeetCode
Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at ...
Read more »

[LeetCode] Problem 345 - Reverse Vowels of a String

Posted on 2019-08-26 | In Algorithm , LeetCode
Write a function that takes a string as input and reverse only the vowels of a string. ExampleNo.1Input: “hello” Output: “holle” No.2Input: “leetcode” ...
Read more »

【图解设计模式】Memento模式

Posted on 2019-08-26 | In Design Pattern
引入表示实例状态的角色,在保存和恢复实例时有效地防止对象的封装性遭到破坏。 示例一个收集水果和获取金钱数的掷骰子游戏,游戏规则很简单,具体如下。 游戏是自动进行的 游戏的主人公通过掷骰子来决定下一个状态 当骰子点数为1的时候,主人公的金钱会增加 当骰子点数为2的时候,主人公的金钱会减少 当骰子点数 ...
Read more »

Binary Indexed Tree

Posted on 2019-08-25 | In Algorithm , Data Structure
A Fenwick tree or binary indexed tree is a data structure that can efficiently update elements and calculate prefix sums in a table of numbers. 1D123 ...
Read more »

Segment Tree

Posted on 2019-08-25 | In Algorithm , Data Structure
A segment tree also known as a statistic tree is a tree data structure used for storing information about intervals, or segments. It allows querying w ...
Read more »

Prefix Tree

Posted on 2019-08-25 | In Algorithm , Data Structure
A trie, also called digital tree, radix tree or prefix tree, is a kind of search tree—an ordered tree data structure used to store a dynamic set or as ...
Read more »
1…161718…78
mrlonelyjtr

mrlonelyjtr

间歇性踌躇满志,持续性混吃等死

780 posts
18 categories
18 tags
Github
© 2020 mrlonelyjtr
Powered by Hexo
Theme - NexT.Pisces