at 48:40 , 2 AND 1 is 0 not 1 . ALso 1 OR 6 is 7 not 1 , and if they are logical AND , OR operator , not bitwise. then how do we differentiate what is asked??
The logical AND operator ( && ) returns true if both operands are true and returns false otherwise. The operands are implicitly converted to type bool before evaluation, and the result is of type bool . Logical AND has left-to-right associativity
import java.util.*; import java.util.Arrays; public class DataServer { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String data = sc.next(); char server[] = data.toCharArray(); Arrays.sort(server); int n = server.length; int count = 0; for (int i = 1; i < n; i++) { if (server[i] == server[i - 1]) { count++; } } System.out.println(count); sc.close(); } } I have written this code for coding question 1, is this correct??
@apoorvmondal1126 and @avantikasingh5481 Actually here AND and OR operators are Logical operators not bitwise and any number apart from zero is considered as True so the final ans is also True i.e. 1
Solving starts 8:32
at 48:40 , 2 AND 1 is 0 not 1 . ALso 1 OR 6 is 7 not 1 , and if they are logical AND , OR operator , not bitwise. then how do we differentiate what is asked??
The logical AND operator ( && ) returns true if both operands are true and returns false otherwise. The operands are implicitly converted to type bool before evaluation, and the result is of type bool . Logical AND has left-to-right associativity
Sir, registration are closed 😢😢😢
import java.util.*;
import java.util.Arrays;
public class DataServer {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String data = sc.next();
char server[] = data.toCharArray();
Arrays.sort(server);
int n = server.length;
int count = 0;
for (int i = 1; i < n; i++) {
if (server[i] == server[i - 1]) {
count++;
}
}
System.out.println(count);
sc.close();
}
} I have written this code for coding question 1, is this correct??
sir both round hapenning same date?
Hello sir,
can you send the 2024(year) aptitude, english(essay), technical and psyschometric question paper. (tech mahindra)
sir what is mode conducting test
online(home)
offline(office)
please provide code in c++
Sir how to crack essay writing?
Can we get this codes in java?
can i solve it using python?
Please provide coding notes in Java @Lokesh sir
import java.util.HashMap;
import java.util.Scanner;
class HelloWorld {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int arr[]=new int[n];
for(int i=0;i
i think pseudocode question 3 is solved wrong!! 2 and 1 is 0 and 0 or 6 will be 6 . can anyone confirm??
2 and 1 =0
@@avantikasingh5481 yup
@@avantikasingh5481 smjh nhi aara inne kaise solve kiya hai , aur jo answer aara hai mera 6 voto option mehi nhi hai...
@@apoorvmondal1126 exactly. options mein answer nahi hai.shayad galat hain
@apoorvmondal1126 and @avantikasingh5481
Actually here AND and OR operators are Logical operators not bitwise and any number apart from zero is considered as True so the final ans is also True i.e. 1