排序
String,Wrapper Class,Stringbuffer,String split()
String,Wrapper Class,Stringbuffer,String split(),String: Strings are used for storing text. A String variable contains a collection of characters surrounded by double quotes. Strin...
Object Class in Java
Object Class in Java,Object Class in Java Object class in Java is present in java.lang package. Every class in Java is directly or indirectly derived from the Object class. If a cl...
Matrix Addition,Matrix Multipliction
Matrix Addition,Matrix Multipliction, 1.Matrix Addition: public static void main(String[] args) { int[][] a= {{1,2,3} {1,2,3}, {4,5,6}}; int[][] b= {{6,7,8}, {1,2,3}, {7,8,9}}; int...
matrix multipilication,matrix addision
matrix multipilication,matrix addision,matrix multipilication: package afterfeb13; public class matrixmulti { public static void main(String[] args) { int[][] a = { { 1, 3, 5 }, { ...
Multidimensional array–matrix
Multidimensional array--matrix,Gross matrix:X package afterfeb13; public class multidimarray { public static void main(String[] args) { int[][] mark = { { 10, 20, 80 }, { 40, 50, 6...
Missing number,Reverse Number,subarray with a given sum
Missing number,Reverse Number,subarray with a given sum,Missing number: package afterfeb13; public class missingnum { public static void main(String[] args) { int[] arr = { 10, 20,...
majority element(Moore’s Voting Algorithm)
majority element(Moore’s Voting Algorithm),Given an array arr. Find the majority element in the array. If no majority exists, return -1. A majority element in an array is an eleme...
count of letter
count of letter,1) Frequency of Each letter in a given String(key != '*') 2) Non-repeated char. in a given String(count==1) 3) Repeated Char. in a given String(count>1) 4) First...
Searching in java
Searching in java, Searching: -->Searching Algorithms are designed to check for an element or retrieve an element from any data structure where it is stored. -->In Java,searc...
Count of digits and Palindrome
Count of digits and Palindrome, Count of Digits: -->Given a number n, the task is to return the count of digits in this number. Example: Input: n = 1567 Output: 4 Explanation: T...
python using Eb bill basic
python using Eb bill basic,units = int(input('Enter the total number of units: ')) if units <= 100: bill = 0 elif units <= 200: bill = (units - 100) * 2 elif units <= 500:...
Linear search and Binary search programs
Linear search and Binary search programs, Linear Search: int[] ar = {10,45,67,100} int key = 67; for(int i=0;i<ar.length;i++) { if(ar[i]==key) System.out.println('key is present...