Skip to content
Chunyang Wen
Writing About

Combination and permutation of an array

Posted
By Chunyang Wen
1 min read
  • 简介
  • 无重复元素
    • 组合
    • 排列
  • 重复元素
    • 组合
    • 排列

简介

本文主要介绍获取数组子集和的集中常见的题型。

  • 组合:不考虑顺序
  • 排列:考虑顺序
  • 数组里面元素是否有重复:可以和排列或者组合结合

无重复元素(distinct number)

组合

排列

重复元素(duplicate number)

组合

排列

本文完

blog, algorithm
leetcode
This post is licensed under CC BY 4.0 by the author.
Share

Further Reading

Jan 4, 2025

Construct the Rectangle

This problem is a typical use case of double pointer in an array. Like in a sorted array, find two elements who sum to a target number. This problem asks for the multiplication. Actually I was thi...

Dec 28, 2024

Pointer to pointer

For List related problem, we usually will not use the recursive way to solve it. For binary search tree, we might use it. In this blog, I just want to demonstrate that we can use recursive function...

Dec 27, 2024

Integer overflow

In the world of data types, each type has its own range. Overflow can happen when you do math on them. For example if you add one to the largest positive int32 number, you will get an overflow erro...

-

-

Home Writing About RSS
© 2026 Chunyang Wen

Trending Tags

python cpp dailycodingproblem leetcode google reading tools tensorflow facebook shell

New content available