8000 mergeTwoLists算法优化和tex文件中集合符号的修改 by advancedxy · Pull Request #10 · soulmachine/leetcode · GitHub
[go: up one dir, main page]

Skip to content

mergeTwoLists算法优化和tex文件中集合符号的修改 #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 2, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
8000 Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change set union, intersection and symmetric difference symbol
  • Loading branch information
advancedxy committed Dec 30, 2013
commit a935805216f7e14125b32619a72c1bb62cc7b9b7
2 changes: 1 addition & 1 deletion C++/chapBruteforce.tex
6B13
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ \subsubsection{增量构造法}
\subsubsection{二进制法}
本方法的前提是:集合的元素不超过int位数。用一个int整数表示位向量,第$i$位为1,则表示选择$S[i]$,为0则不选择。例如\fn{S=\{A,B,C,D\}},则\fn{0110=6}表示子集\fn{\{B,C\}}。

这种方法最巧妙。因为它不仅能生成子集,还能方便的表示集合的并、交、差等集合运算。设两个集合的位向量分别为$B_1$和$B_2$,则$B_1|B_2, B_1 \& B_2, B_1 \^ B_2$分别对应集合的并、交、对称差。
这种方法最巧妙。因为它不仅能生成子集,还能方便的表示集合的并、交、差等集合运算。设两个集合的位向量分别为$B_1$和$B_2$,则$B_1\cup B_2, B_1 \cap B_2, B_1 \triangle B_2$分别对应集合的并、交、对称差。

二进制法,也可以看做是位向量法,只不过更加优化。

Expand Down
0