mehboobali98 / Longest-Increasing-Subsequence-DP

Given an array or list of n integers, we need to find the longest increasing subsequence. The array could include positive and negative integers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Longest Increasing Subsequence Dynamic Programming

Problem Statement

Given an array or list of n integers, we need to find the longest increasing subsequence. The array could include positive and negative integers.

Approach

The algorithm to solve the problem has been implemented in three ways:

  • recursive
  • top-down
  • bottom-up (Dynamic Programming)

Time Complexity

The time complexity of the dynamic programming solution is: O(N^2)

Directory Structure

📦Longest-Increasing-Subsequence-DP
┣ 📜main.cpp
┗ 📜README.md

About

Given an array or list of n integers, we need to find the longest increasing subsequence. The array could include positive and negative integers.


Languages

Language:C++ 88.0%Language:CMake 12.0%