Hi,
I modified my source code by using your fucntion (that prints the LIS).
Here is the new code :
[c]#include <stdio.h>
#include <iostream.h>
#include <conio.h>
#define NMAX 100
int N; //sequence length
int height[NMAX];
int length[NAMAX];
int predecessor[NMAX];
int maxarr(int t[],int n ...
Search found 3 matches
- Tue Jan 21, 2003 2:58 pm
- Forum: C
- Topic: DP--Longest Increasing Subsequence
- Replies: 2
- Views: 3908
- Mon Jan 20, 2003 9:12 pm
- Forum: C
- Topic: DP--Longest Increasing Subsequence
- Replies: 2
- Views: 3908
DP--Longest Increasing Subsequence
Hey all,
This time I need some help about the famous LIS problem.. Well, I found an algorithm that finds the LIS, but don't know how to procede to reconstruct the subsequence. Here is the code :
[c]
#include <stdio.h>
#include <iostream.h>
#include <conio.h>
void main()
{
int height[10];
int ...
This time I need some help about the famous LIS problem.. Well, I found an algorithm that finds the LIS, but don't know how to procede to reconstruct the subsequence. Here is the code :
[c]
#include <stdio.h>
#include <iostream.h>
#include <conio.h>
void main()
{
int height[10];
int ...
- Thu Jan 16, 2003 2:41 pm
- Forum: C
- Topic: Quick Sort
- Replies: 6
- Views: 3975
Quick Sort
Hey all,
I need to know to use the qsort() function.. especially the sort_function(const void *a, const void *b) that is used by qsort()...
Thank you
I need to know to use the qsort() function.. especially the sort_function(const void *a, const void *b) that is used by qsort()...
Thank you
