Java Hyd Team
746 subscribers
986 photos
39 videos
670 files
690 links
https://teamhydteam.my.canva.site/

Can visit us on our website ๐Ÿ˜Š
Still working on it ๐Ÿ˜Š
Download Telegram
//Write a java program for Fibonacci Series from 1 to 100?

public class FibonacciExample1 {
public static void main(String[] args) {
int n1=0,n2=1,n3,i,count=100;
System.out.print(n1+" "+n2);//printing 0 and 1

for(i=2;i<count;++i)//loop starts from 2 because 0 and 1 are already printed
{
n3=n1+n2;
System.out.print(" "+n3);
n1=n2;
n2=n3;
}

}}
int nums []= x.nextInt();
int[] count = new int[101];
int[] res = new int[nums.length];

for (int i =0; i < nums.length; i++) {
count[nums[i]]++;
}

for (int i = 1 ; i <= 100; i++) {
count[i] += count[i-1];
}

for (int i = 0; i < nums.length; i++) {
if (nums[i] == 0)
res[i] = 0;
else
res[i] = count[nums[i] - 1];
}

return res;
}
import java.io.*;
import java.util.Scanner;

public class NumerSmallerThanCurrentNumber {

public static void main(String[] args) {

Scanner scanner = new Scanner(System.in);

System.out.println("Enter the size of array : ");
int n = scanner.nextInt();


//Declaring the array
int arr[] = new int[n];

System.out.println("Enter the array elements : ");

for(int i=0;i<n;i++) {
arr[i] = scanner.nextInt();
}

System.out.println("The Entered elements are : ");
for(int i=0;i<n;i++) {
System.out.print(arr[i] + " ");
}

int listOfElements[] = countSmallerNumber(arr);

System.out.println("\nThe list of numbers smaller than current number : ");

for(int i=0;i<listOfElements.length;i++) {

System.out.print(listOfElements[i]+" ");
}
}

//Function for count the smaller element than the current element
private static int[] countSmallerNumber(int[] arr) {

//Take a array for storing the the count of smaller element than the current element
int countNumber[] = new int[arr.length];

for(int i=0;i<arr.length;i++) {

int count=0;

for(int j=0;j<arr.length;j++) {

//Compare current elements with other elements
if((arr[i]>arr[j]) && (i!=j)) {

//Increase the count, if other element is smaller than the current element
count++;
}
}
countNumber[i]=count;
}

return countNumber;
}
}
Cadence is Hiring Software Engineer Intern
Role : SDE intern
Experience: Student
Batch - 2022 /2023 /2024
Qualification - pursuing or completed B.E/B.Tech/M.E/M.Tech
Location: Remote ( Work from home)
Salary: 40k - 45k per month
Duration: 11 month



Apply now: https://www.linkedin.com/jobs/view/3274286602
Java Hyd Team
import java.io.*; import java.util.Scanner; public class NumerSmallerThanCurrentNumber { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("Enter the size of array : "); int n = scanner.nextInt();โ€ฆ
HashMap<Integer,Integer> m= new HashMap<>();
int[] nums1= nums.clone();
Arrays.sort(nums);
int[] result= new int[nums.length];
for(int i=0;i<nums.length;i++){
if(!m.containsKey(nums[i])){
m.put(nums[i],m.getOrDefault(nums[i],i));
}
}
for(int j=0;j<nums.length;j++){
result[j]=m.get(nums1[j]);
}

return result;
}
import java.util.*;
class HelloWorld {
public static void main(String[] args) {
List<Integer> inp = Arrays.asList(8, 1, 2, 2, 3);
List<Integer> al = Arrays.asList(8, 1, 2, 2, 3);
Collections.sort(al);
Map<Integer, Integer> o = new HashMap<>();
List<Integer> res = new ArrayList<>();
for(int i = 0; i < al.size(); i++){
if (i != 0 && al.get(i) == al.get(i-1)) {
o.put(al.get(i), i-1);
} else {
o.put(al.get(i), i);
}
}
for(int i = 0; i < inp.size(); i++) {
res.add(o.get(inp.get(i)));
}

System.out.println(res.toString());
}
}
// Online Java Compiler
// Use this editor to write, compile and run your Java code online
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.stream.Collectors;
class HelloWorld {
public static void main(String[] args) {
//List<Integer> al = Arrays.asList(8, 1, 2, 2, 3);
int[] l = new int[5];
int[] o = new int[5];
l[0] = 8;
l[1] = 1;
l[2] = 2;
l[3] = 2;
l[4] = 3;

for(int i = 0;i<l.length;i++){
int count = 0;
for(int j = 0; j < l.length; j++){
if(l[i] > l[j]){
count++;
}
}
o[i] = count;
}
ArrayList<Integer> integerArray = (ArrayList<Integer>) Arrays.stream(o).boxed().collect(Collectors.toList());
System.out.println(integerArray.toString());
for(int i = 0;i<l.length;i++){
System.out.println(o[i]);
}
}
}
// Online Java Compiler
// Use this editor to write, compile and run your Java code online
import java.util.*;
class HelloWorld {
public static void main(String[] args) {
List<Integer> i1 = Arrays.asList(2, 4, 3);
List<Integer> i2 = Arrays.asList(5, 6, 4);
List<Integer> o = new ArrayList<>();
int d = 0;
for(int i = 0; i < i1.size(); i++){
int x = i1.get(i) + i2.get(i);
if (x > 9) {
d = x/10;
int r = x%10;
x = d>0 ? r : x;
} else {
x = d>0 ? (x + d) : x;
}

o.add(x);
}
System.out.println(o.toString());
}
}
DO VOTE WE WILL COVER EVERYTHING EVERY THIRD DAY OF THE WEEK SUNDAY WE WILL ARRANGE TESTS SO THAT YOU CAN GET MORE CLARITY
๐Ÿ‘3
You can select multiple
Java Hyd Team
Which topic you want to learn from scratch
Out of 68 people only 9 people are having issues in Java these 9 people can ping @stockkida will start from Wednesday till Monday please update with the topics whichever you want to learn will cover the best solution with good techniques
Believe me in next 1 year we will be in maang companies
Java Hyd Team
Photo
I hope you all completed these questions
๐Ÿ‘2
Java Hyd Team
JAVASCRIPT NOTES FOR BEGINNERS.pdf
Complete these ๐Ÿ˜Š๐Ÿ˜Š use MS office to open these PDFs for better experience
๐Ÿ‘2
I want support for SAP work

Anyone here who can do let me know @stockkida