原创 Leetcode [91]: Decode ways

A message containing letters from A-Z is being encoded to numbers using the following mapping: ‘A’ -> 1 ‘B’ -> 2 …

原创 Xtensa 仿真環境tunning分析(ISS profile)

linux gprof tool https://www.ibm.com/developerworks/cn/linux/l-gnuprof.html Tenslica Profiling with the Xtensa ISS

原创 Leetcode[234] Palindrome Linked List

234. Palindrome Linked List recursion not work, stack will be overflow class Solution(object): def isPalindrome

原创 leetcode summary: link list problem solved by extra space

143. Reorder List link list ⇒ list class Solution(object): def reorderList(self, head): """ :ty

原创 Leetcode summary: backstrack problem

46. Permutations Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3]

原创 python 底層實現原理

python framework //object base class typedef struct _object { PyObject_HEAD } PyObject; //variable length object

原创 Leetcode summary: some trick problem

Here list some problem, maybe, sometimes, hard to think the way to resolve, and summary here, when it comes to the

原创 xtensa instruction set architeture(ISA)

Code density The Xtensa core ISA is implemented as 24-bit instructions This instruction width pro- vides a direct

原创 linux設備模型: kobject, kset

kobject linux3.4 struct kobject { const char *name; struct list_head entry; // directory entry, used for mou

原创 [Algorithm]microsoft-a-string-into-sub-strings-with-additional-info-within-limited-length

https://leetcode.com/discuss/interview-question/439260/microsoft-phone-split-a-string-into-sub-strings-with-additio

原创 Linux Driver 和Device的匹配過程

platform_driver_register() ->driver_register() ->bus_add_driver() ->driver_attach() ->bus_for_each_dev() 對每個掛在虛擬的pl

原创 linux driver中的面向對象的應用和相關設計模式

創建類設計模式: 單例模式、 工廠模式、 抽象工廠模式、 原型模式、 建造者模式 結構類設計模式 裝飾器模式、 適配器模式、 門面模式、 組合模式、 享元模式、 橋樑模式 行爲類設計模式。 策略模式、 責任鏈模式、 命令

原创 [Algorithm] 中文數字轉換爲阿拉伯數字

#coding=utf-8 chs_arabic_map = {u'零':0, u'一':1, u'二':2, u'三':3, u'四':4, u'五':5, u'六':6, u'七':7, u'八':8, u'九

原创 Leetcode sumary: Math problem

29. Divide Two Integers class Solution(object): def divide(self, dividend, divisor): """ :type

原创 [算法] 二叉排序樹查找中位數

比較tricky的解法,不用額外的內存 首先考慮將二叉樹轉換成雙向鏈表 [LeetCode] 426. Convert Binary Search Tree to Sorted Doubly Linked List 將二叉搜索樹轉