Posts

SDITSCODERS SOLUTION

Calculate Area 2 Solution import java.io.*; import java.util.*; public class Solution {     public static void main(String[] args) {         Scanner in=new Scanner(System.in);         int l=in.nextInt();         int b=in.nextInt();         System.out.println(l*b);     } } Find the max 4 Solution import java.io.*; import java.util.*; public class Solution {     public static void main(String[] args) {         int [] ar=new int[10];                 Scanner in=new Scanner(System.in);         for(int i=0;i<10;i++)             ar[i]=in.nextInt();         int max=ar[0];         for(int i=1;i<10;i++)             if(ar[i]>max)                 max=ar[i];         System.out.println(max);     } } Arrow's Movement Solution import java.io.*; import java.util.*; public class Solution {     public static void main(String [] args)     {         Scanner in =new Scanner(System.in);   int x_in=in.nextInt();   int y_in=in.nextInt();   int n=i

What is TCS CodeVita and how to register for it?

CodeVita is a Coding Contest conducted by TCS. Registration is open for that and the last date of Registration is 6th July 2020. Who can register for it? Students from 2021,2022,2023 Batch can register for CodeVita 2020.   Benefits of CodeVita:- 1. We can get a job offer from 3.5LPA to 7 LPA in TCS. 2. We can get an internship offer in TCS. 3. Winners will receive a total cash prize of USD 20,000. Structure of Contest:- The contest will be organized in 3 rounds 1. Pre Qualifier Round. 2. Qualifier Round. 3. Grand Finale. 1.Per Qualifier Round The Pre Qualifier Round will be a 24 hours contest window and each participant will be provided 6 hours to complete the contest. There may be 5 or 6 questions in this round. If we qualify this round then only we can go to 2nd round. And all the participants who will qualify this round will get a direct opportunity of interview for TCS NINJA  without any written test. (package 3.5 LPA) The tentative date for Qualifier

Most Frequently asked programs in Technical interview

Here are some programs that are frequently asked in Technical interviews. 1. Program to print the Fibonacci series.  Fibonacci series is a series in which a term is the sum of it's two previous terms.      Nth term = (N-1)th term + (N-2)th term Fibonacci series is: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 Program in Java: import java.util.Scanner; class Fibonacci { public static void main(String [] args) { Scanner in =new Scanner(System.in); int n=in.nextInt(); for(int i=1;i<=n;i++) { System.out.print(nth_term(i)+" "); } } static int nth_term(int n)         //Function to find nth term of Fibonacci serires { if(n==1||n==2) return 1; else return nth_term(n-1)+nth_term(n-2); } } 2. Program to print the reverse of a number. import java.util.Scanner; class Reverse { public static void main(String [] args) { Scanner in =new Scanner(System.in); int n=in.nextInt(); int rem,reverse=0; while(n>

How to make your project publicly accessible without taking any Hosting and Domain?

Image
Today we will learn, how can we make our project publicly accessible. Many times we develop web projects and want to view a demo of our website without purchasing any hosting or domain. So there is an application by which we can achieve it. And it is "NGROK". First, we have to download ngrok then we can make our localhost project accessible to the internet. you can download ngrok from this link:- https://ngrok.com/download After downloading the zip file, extract it then you will get ngrok.exe Open ngrok.exe and run following command on it >ngrok http port_number Here port_number may vary from different projects and localhost settings. For PHP it is 7777 and for JSP  it is 8080. Any way we can easily determine our port number by localhost link. >ngrok http 7777  (for PHP) >ngrok http 8080  (for JSP) then you will get a forwarding link on your screen as you can see in the picture. Now use this link in place of  http://localhost:7777 then you can a

Top useful websites for campus preparation

Hello every one, here I have listed some of the most useful websites which you can refer to your campus preparation. 1. Hackerrank link:-  https://www.hackerrank.com/ Description:- This website provides an online platform for increasing our coding skills. 2. Prepinsta link:- https://prepinsta.com/ Description:- Here you can see previously written test formate of MNC's campus drive. 3. Faceprep link:- https://www.faceprep.in/ Description:- Here you can see previously written test formate of MNC's campus drive. 4. Indiabix link:- https://www.indiabix.com/ Description:- It is useful for quantitative aptitude and logical reasoning. 5. MySirg link:-  https://www.mysirg.com/ Description:- It's an online learning platform. 6. Apuzz link:-  https://apuzz.com/ Description:- Here you can see all the latest drive updates. 7. CodeChef link:-  https://www.codechef.com/ Description:- Coding practice platform. Useful YouTube Channels are 1. Mysirg 2. Durg

Grading Students Solution

Hello, developers here is the solution for Grading Students Challenge. #include <math.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> #include <limits.h> #include <stdbool.h> int* solve(int grades_size, int* grades){     int *result=(int *)malloc(sizeof(int)*grades_size);     int r,multi;     for(int i=0;i<grades_size;i++)     {         r=grades[i]/5;         multi=5*(r+1);         if(grades[i]>=38)         {         if(multi-grades[i]<3)         {result[i]=multi;}             else                 result[i]=grades[i];         }         else             result[i]=grades[i];     }     return (result); } int main() {     int n;     scanf("%d", &n);     int *grades = (int *)malloc(sizeof(int) * n);     for(int grades_i = 0; grades_i < n; grades_i++){        scanf("%d",&grades[grades_i]);     }       int* result = solve(n,grades);     f

Mini Max Solution

This is the solution for Mini Max Challenge. #include <math.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> #include <limits.h> #include <stdbool.h> int main() {     int *arr = malloc(sizeof(int) * 5);     int min,max,i;     int minsum=0,maxsum=0;     for(int arr_i = 0; arr_i < 5; arr_i++){        scanf("%d",&arr[arr_i]);     }     min=0;     for(i=1;i<5;i++)     {        if(arr[min]>arr[i])            min=i;     }     for(i=0;i<5;i++)     {         if(i!=min)         {             maxsum=arr[i]+maxsum;         }     }     max=0;     for(i=1;i<5;i++)     {        if(arr[max]<arr[i])            max=i;     }     for(i=0;i<5;i++)     {         if(i!=max)         {             minsum=arr[i]+minsum;         }     }     printf("%u %u",minsum,maxsum);         return 0; }