I got many texts over Linkedin and telegram, that how to build logic? ๐ฅบ๐ฅบ ๐
Question: Whenever I was unable to solve a problem, I see the discussion forum, understand that and implement it. But after that also I stuck in new problems. โ
Answer: If you got the wrong answer to any problem, see discuss forum or YouTube and try to understand their solution after that The ๐ฆ๐จ๐ฌ๐ญ ๐ข๐ฆ๐ฉ๐จ๐ซ๐ญ๐๐ง๐ญ step, check why your solution was not worked there, In which test case it failed, and why. This will give you better clarity of question and also help in the future to build logic. โค๏ธโ
๐๐ฑ๐ฉ๐๐ซ๐ข๐๐ง๐๐๐ ๐๐ Love to hear some more tips, this will definitely help juniors to understand better โค๏ธโ
Question: Whenever I was unable to solve a problem, I see the discussion forum, understand that and implement it. But after that also I stuck in new problems. โ
Answer: If you got the wrong answer to any problem, see discuss forum or YouTube and try to understand their solution after that The ๐ฆ๐จ๐ฌ๐ญ ๐ข๐ฆ๐ฉ๐จ๐ซ๐ญ๐๐ง๐ญ step, check why your solution was not worked there, In which test case it failed, and why. This will give you better clarity of question and also help in the future to build logic. โค๏ธโ
๐๐ฑ๐ฉ๐๐ซ๐ข๐๐ง๐๐๐ ๐๐ Love to hear some more tips, this will definitely help juniors to understand better โค๏ธโ
๐5โค3
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Qualcomm is hiring for their Software test teams in Hyderabad.
Batch eligible: 2021 and 2022 passouts (BTech, Mtech, (Cs, IT, ECE or Embedded))
Skills required: Good knowledge on C/ C++/ Python Coding, OS, DSA.
If interested send your resume over aayushar@qti.qualcomm.com
Batch eligible: 2021 and 2022 passouts (BTech, Mtech, (Cs, IT, ECE or Embedded))
Skills required: Good knowledge on C/ C++/ Python Coding, OS, DSA.
If interested send your resume over aayushar@qti.qualcomm.com
๐1
awk 'BEGIN{FS=";", count=0;}
{
if($4>10000)
{
count+=$3
}
}
END { if(count==0){
print "Total count: 0";
}
else
{
print "Total count:", count;
}
}'
TCS PRAโ
{
if($4>10000)
{
count+=$3
}
}
END { if(count==0){
print "Total count: 0";
}
else
{
print "Total count:", count;
}
}'
TCS PRAโ
๐2
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.nextLine();
User xexamster[] = new User[n];
for (int i = 0; i < xexamster.length; i++) {
int id = sc.nextInt();
sc.nextLine();
String name = sc.nextLine();
String emil = sc.nextLine();
int age = sc.nextInt();
sc.nextLine();
xexamster[i] = new User(id, name, emil, age);
}
int fs1 = sc.nextInt();
int ans1 = xexamster2(xexamster);
if (ans1 != 0) {
System.out.println(ans1);
} else {
System.out.println("No Users found.");
}
User ans2 = xexamster1(xexamster, fs1);
if (ans2 != null) {
System.out.println(ans2.getName());
System.out.println(ans2.getEmil());
} else {
System.out.println("No User found with the given id.");
}
}
public static int xexamster2(User[] d) {
int p = 0;
for (int i = 0; i < d.length; i++) {
{
p += d[i].getAge();
}
}
return p;
}
public static User xexamster1(User[] d, int s) {
User p = null;
int a = 0;
for (int i = 0; i < d.length; i++) {
if (d[i].getId() == s) {
p = d[i];
}
}
return p;
}
}
class User {
private int id;
private String name;
private String emil;
private int age;
public User(int id, String name, String emil, int age) {
super();
this.id = id;
this.name = name;
this.emil = emil;
this.age = age;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmil() {
return emil;
}
public void setEmil(String emil) {
this.emil = emil;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
//////////////////////// UNIX /////////////////
/*
* awk 'BEGIN{FS=";", count=0;} { if($4>10000) { count+=$3 } } END {
* if(count==0){ print "Total count: 0"; } else { print "Total count:", count; }
* }'
*
*
*/
TCS PRAโ
public class Solution {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.nextLine();
User xexamster[] = new User[n];
for (int i = 0; i < xexamster.length; i++) {
int id = sc.nextInt();
sc.nextLine();
String name = sc.nextLine();
String emil = sc.nextLine();
int age = sc.nextInt();
sc.nextLine();
xexamster[i] = new User(id, name, emil, age);
}
int fs1 = sc.nextInt();
int ans1 = xexamster2(xexamster);
if (ans1 != 0) {
System.out.println(ans1);
} else {
System.out.println("No Users found.");
}
User ans2 = xexamster1(xexamster, fs1);
if (ans2 != null) {
System.out.println(ans2.getName());
System.out.println(ans2.getEmil());
} else {
System.out.println("No User found with the given id.");
}
}
public static int xexamster2(User[] d) {
int p = 0;
for (int i = 0; i < d.length; i++) {
{
p += d[i].getAge();
}
}
return p;
}
public static User xexamster1(User[] d, int s) {
User p = null;
int a = 0;
for (int i = 0; i < d.length; i++) {
if (d[i].getId() == s) {
p = d[i];
}
}
return p;
}
}
class User {
private int id;
private String name;
private String emil;
private int age;
public User(int id, String name, String emil, int age) {
super();
this.id = id;
this.name = name;
this.emil = emil;
this.age = age;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmil() {
return emil;
}
public void setEmil(String emil) {
this.emil = emil;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
//////////////////////// UNIX /////////////////
/*
* awk 'BEGIN{FS=";", count=0;} { if($4>10000) { count+=$3 } } END {
* if(count==0){ print "Total count: 0"; } else { print "Total count:", count; }
* }'
*
*
*/
TCS PRAโ