Interview Experience at TSYS| SDET profile

In this article, we will share TSYS Interview experience for SDET profile.

Interview Experience at TSYS for SDET profile

First Round - Written test
Mode of test - Online

Questions
  • What is the output of below SQL statement
    • SELECT LPAD("SQL Tutorial", 20,  " ABC");
    • Solution - ABCABCABSQL Tutorial
    • Explanation - LPAD() function left pads a string with another string, to a certain length
    • Syntax of LPAD - LPAD(string, length, lpad_string )
  • How do you see Structure of a table in a SQL?
    • Using Describe statement
  • A plane is flying 2400 Kms from Source A to destination B. Speed of the plane is 600 km/hr and speed of the wind tailing it is 40 Km/hr. How many hours after take off would it be faster to go to B than to return to A in case of an emergency?
    • A . 1.65 hours
    • B. 1.5 hours
    • C. 1.75 hours
    • D. 2 hours
    • E. None of these
      • Solution - 
      • Speed from A to B - 640 Km/hr
      • Reverse speed - 560 Km/hr
      • Formula = x/500 >=  (2400-x) / 640
      • x >= 1120 km.
      • Time taken to cover 1120 km = 1120/ 560 = 2 hr.
  • What is the command to list the contents of a directory?
    • dir command
    • the ls command(either of this 2 commands)
  • Can we declare constructor as a private?
    • Yes, we can. This approach is used in Singleton Design pattern.
  • Select the command that will not wait for a new page to load before moving onto the next command?
    • A. clickAndWait
    • B. selectAndType
    • C. typeAndWait
    • D. selectAndWait
  • Select the command which is used to print a string value or a variable in the selenium IDE?
    • Answer - echo command
Round 2 - Technical Round

Interviewer will ask you to share your screen and open any IDE, then they will ask you to write 2/3 programs. Please prepare for the programs based questions. Once you write the program, they will ask you to explain it.
  • Write a program to print the count of Consonants and vowels.
    • We have covered it here.
  • Write a program to print the occurrence of a character in a string.
  • Write a program to check whether number entered is prime or not?
  • What do you understand by Constructor?
  • Can Constructor be inherited?
    • No, it cannot be inherited.
  • Can Constructor be declared Private?
    • Yes, constructors can be declared private.
  • Why do we use Super Keyword in Java?
    • Super keyword refers to the superclass(parent) objects. Superclass objects and superclass constructors can be called using Super keyword.
  • Write an SQL query to print the results for Employee table whose name starts with ' A'?
    • Select * from Employee where emp_name like ('A%');
  • Write a SQL query to print the name of the Employees whose second character of the name is ' A'?
    • Select * from Employee where emp_name like ('_A%');
  • How do you left join 2 tables?
  • How do you inner join 2 tables?
  • Difference between Where and Having clause in SQL?
    • Where is used to filter our the rows.
    • Having is used for aggregate functions such as MAX, MIN, SUM, AVG, Count. We can use Group by along with having. 
    • Syntax of Having -
      • Select MAX(Salary) from Employee Having emp_id>105;

Program to print the occurrence of a character in a String

Logic -

The idea is to create a count array of size 256. Traverse input string and for every character increment its count. 

// Java program for the above approach
class NoOfOccurenceOfCharacters {
static final int MAX_CHAR = 256;

static void getOccuringChar(String str)
{
// Create an array of size 256 
// i.e. ASCII_SIZE
int count[] = new int[MAX_CHAR];

int len = str.length();

// Initialize count array index
for (int i = 0; i < len; i++)
count[str.charAt(i)]++;

// Create an array of given String size
char ch[] = new char[str.length()];
for (int i = 0; i < len; i++) {
ch[i] = str.charAt(i);
int count = 0;
for (int j = 0; j <= i; j++) {

// If any matches found
if (str.charAt(i) == ch[j])
count++;
}

if (count == 1)
System.out.println(
"Number of Occurrence of "
+ str.charAt(i)
+ " is:" + count[str.charAt(i)]);
}
}

// Driver Code
public static void main(String[] args)
{
String str = "geeksforgeeks";
getOccuringChar(str);
}
}

Comments

Popular posts from this blog

Azure Tutorials Series - Azure Networking

Testing in CI/CD

Azure Tutorials Series - IaaS vs PaaS vs SaaS