Skip to main content

All Questions

5 votes
1 answer
670 views

Longest Arithmetic Progression Algorithm

Problem Statement: > Given a sorted array, find the length of the longest arithmetic progression in it. Examples: numbers = new int[]{1, 3, 4, 5, 7, 8, 9} The length is 5, and the sequence ...
Jianmin Chen's user avatar
  • 2,416
5 votes
1 answer
1k views

Word break problem with dynamic programming

This is the original question. I have implemented it in both ways. If I enter the word "icecream", should I output "ice" "cream" and also "icecream", or just "ice" and "cream"? Is this a good ...
Gilad's user avatar
  • 5,293