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)

Recommended Answers

All 2 Replies

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.

it's "plz hlp mi". Be sure to get your question title right next time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.