240 发简信
IP属地:内蒙古
  • 1. Two Sum

    Given an array of integers, return indices of the two numbers such that ...

  • 0/1 背包

    有 N 件物品和一个容量为 V 的背包。第 i 件物品的费用是 c[i],价值是 w[i]。求解将哪些物品装入背包可使价值总和最大 f[i][v...

  • 0/1 背包 II

    要求要求恰装满背包在初始化时除了 f[0]为 0 其它 f[1..V]均设为-∞,这样就可以保证最终得到的f[N]是一种恰好装满背包的最优解。可...

  • 完全背包

    有 N 种物品和一个容量为 V 的背包,每种物品都有无限件可用。第 i 种物品的费用是 c[i],价值是 w[i]。求解将哪些物品装入背包可使这...

  • 276 Paint Fence

    There is a fence with n posts, each post can be painted with one of the ...

  • 279. Perfect Squares

    Given a positive integer n, find the least number of perfect square numb...

  • 300. Longest Increasing Subsequence

    Given an unsorted array of integers, find the length of longest increasi...

  • 303. Range Sum Query - Immutable

    Given an integer array nums, find the sum of the elements between indice...

  • 304. Range Sum Query 2D - Immutable

    Given a 2D matrix matrix, find the sum of the elements inside the rectan...