Varanasi-Software-Junction / JavaCodecamp

Java code repository of Varanasi Software Junction. Its public and free for use. Please star if you find it useful
MIT License
11 stars 5 forks source link

Java Questions Set - 1 #15

Open champaksworldcreate opened 2 years ago

champaksworldcreate commented 2 years ago
  1. Find longest increasing continuous subarray. ex a=[4,6,2,1,4,5,6,7,-1] [1,4,5,6,7]

  2. Find longest word in a sentence. ex. A train from Chiraigaon to London Chiraigaon

  3. Add all single numbers in between string . ex : "a1b2c5d8" 16

  4. Print all prime number between 2 and 500.

  5. Count pairs whose sum is equal to X in given array. x=6 a=[1,2,9,-3,4,5] output: 3

  6. Print all distinct number in sorted array . Ex a=[1,1,2,3,4,5,5,6,7,8,9,9,9,9] Output: 1,2,3,4,5,7,8,9