-1
Problem 1:
You are given n you are required to print the following rhombus.

Example:

n=5

    1
   121
  12321
 1234321
123454321
 1234321
  12321
   121
    1

Problem 2:
Max Subsequence sum using 3 nested for loops.               (n^3)
Max subsequence sum using 2 nested for loops. <-- Challenge      (n^2)

You shold print the sequence.

Problem 3:
You are given a sequence of characters, you must check if this sequence of characters form a palindrome.

Example:

n=5
a b c b a

ANSWER: YES

Example 2: 

n=5
a b c d e

ANSWER: NO

Problem 4:
Given a sequence of characters followed by a pattern.
You shold check if this pattern exists in the sequence of characters.

Example: 

n=5
a b c d e f
n=3 (pattern)
b c d

ANSWER: YES

Problem 5: (Bonues)
Given two arrays a[] and b[] where a[0] and b[0] correspond to a and b of line 0 where y=ax+b and so on (a[1] and b[1] corresponds to line 1)

You are required to check if there existss three lines intersecting at the same point.

Example:

n=5
1 1 1 1 1 //array a (slopes)
2 3 5 6 7 //array b (y-intercept)
3
Contributors
2
Replies
16
Views
2 Years
Discussion Span
Last Post by jwenting
0

DaniWeb rules clearly state: provide evidence of having done some work yourself if posting questions from school or work assignments

Just copying your assignment questions here is not good enough, and nobody is going to help you unless you show us what you've done and what problems you are having.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.