CS4097D JAVA BASIC SET 2 Solved

45.00 $

Category: Tags: , , , ,

Description

5/5 - (1 vote)

 

  1. Write a function to find if a number is a palindrome or not. Take number as parameter.

 

  1. Write a function that returns all prime numbers between two given numbers.

 

  1. Write a function that returns the sum of first n natural numbers.

 

 

  1. Given a sorted array return the index of given key.

 

Input: arr=[1,2,6,9]

Key : 6

Output: element found at index 2

  1. Given two matrices, multiply them.

6.Find second Largest element in an Array

Input: arr=[1,2,5,7] Output: 5

  1. Given a string s, return the string after replacing every uppercase letter with the same lowercase letter.

 

Input: s = “Hello”

Output: “hello”

  1. java program to reverse a string

Input: s = “Hello” Output: “olleH”

  1. Check given two strings are equivalent or not.

 

 

 

  • ASSIGN2-monkte.zip