WatchGuard Coding Questions asked in the WatchGuard Recruitment exam is provided on this page. Go through this page, to practice WatchGuard Coding Questions.
About WatchGuard
WatchGuard generally knows as WatchGuard Technologies Incorporation is a US – Based Company which was founded in 1996.
They provide outstanding cyber security services like Secured Wi-Fi, Network Security and Multi-Factor Authentication to their customers to protect their data and systems from malware and especially ransomware and give software and support services to enhance Network and Computer Security.
Prime Course Trailer
WatchGuard Exam Pattern 2023
Company
No. Of Questions
Time
Coding Test
2 Questions
60 Minutes
Technical Round 1
10 – 12 Questions
~ 45 Min
Technical Round 2
5 – 6 Questions
~ 50 – 60 Min
About WatchGuard Recruitment Process
Here, in this section, you will find out the steps included in WatchGuard Recruitment Process for the JobProfile : Full Stack Developer, DevOps Engineer and Malware Analyst / Researcher.
Pre – Placement Talks
Online Coding Assessment
Technical Interview ( 2 Rounds )
HR Interview
Managerial Discussions
Now, you will find brief description of all JobProfiles offered by this company below.
WatchGuard Job Description
AWS, Python Angular and Streaming (Full Stack Developer)
Required One (or both) streaming backbone: Kinesis, KAFKA.
Microsoft solution stack as developer including .Net, C#, MSSQL, PowerShell, Windows operating system, Windows server.
Must have proven experience with .NET platform: .NET Core, C#, ASP.NET& Core, MVC, WCF.
Experience with Azure Cloud, Docker, Cosmos DB.
Must have proven experience with object-oriented programming.
Experience with MS SQL database design and development.
Must have experience with REST, XML, JSON, and/or web service experience a plus.
Familiar with agile methodologies, lean, and CI.
DevOps Engineer – AWS and Azure
Proper understanding of Networking/VPCs/monitoring & alerting frameworks and tools.
Knowledge of the Amazon Web Services (AWS) and Microsoft Azure environments, as well as management and operation experience with big Linux (based on Red Hat), Microsoft Windows, and database technologies (DynamoDB, PostgreSQL, MySQL, ElasticSearch etc.)
Understanding of Scrum/Agile & DevOps Process.
Programming language: Go, Scala, Python.
Malware Analyst / Researcher
Malware analysis and reverse engineering.
Command in Reverse engineering tools like IDA Pro, OllyDBG, WinDBG.
Knowledge of other malware analysis tools.
Knowledge of Sandbox Tolls like Cuckoo.
Knowledge of Network Frames analysis (Winpcp/Wireshark).
Knowledge of Sysinternal tools : Sysmon / Autoruns / ProcMon / RegMon / diskMon / TCPView or OS logs (syslogs / EventViewer).
Development of extensions and scripts for these tools.
Windows, APIs, Windows user-space and kernel-space.
Virtualization and emulation.
Knowledge of C / C ++ / Python programming languages.
Knowledge of other programming and scripting languages :.Net, Java, Javascript, VBscript, powersell, etc.
Additional knowledge on other platforms will be valued: iOS and Android.
Pen testing and ethical hacking knowledge is a plus.
A company has a list of jobs to perform. Each job has a start time, end time and profit value. The manager has asked his employee Anirudh to pick jobs of his choice. Anirudh being greedy wants to select jobs for him in such a way that would maximize his earnings. Given a list of jobs how many jobs and total earning are left for other employees once Anirudh picks jobs of his choice.
Note: Anirudh can perform only one job at a time.
Input format:
Each Job has 3 pieces of info – Start Time,End Time and Profit
The first line contains the number of Jobs for the day. Say ‘n’. So there will be ‘3n lines following as each job has 3 lines.
Each of the next ‘3n’ lines contains jobs in the following format:
start_time
end-time
Profit
start-time and end-time are in HHMM 24HRS format i.e. 9am is 0900 and 9PM is 2100
Constraints
The number of jobs in the day i.e’ is less.
than 10000
0<_n<_10000
start-time is always less than end time.
Output format :-
Program should return an array of 2 integers where
1st one is number of jobs left and earnings of other employees
Sample Input 1 :
3
0900
1030
100
1000
1200
500
1100
1200
300
Sample Output 1:
2
400
Sample Explanation 1
Anirudh chooses 1000-1200 jobs. His earnings is 500. The 1st and 3rd jobs ie 0900-1030 and 1100-1200 respectively overlap with the 2nd jobs. But profit earned from them will be 400 only. Hence Anirudh chooses 2nd one. Remaining 2 Jobs & 400 cash for other employees
Sample Input 2:
5
0805
0830
100
0835
0900
100
0905
0930
100
0935
1000
100
1005
1030
100
Sample output 2:
0
0
Sample Explanation 2:
Anirudh can work on all appointments as there are none overlapping. Hence 0 appointments and 0 earnings for other employees.
import java.util.*;
class Job {
public Integer st;
public Integer ed;
public Integer cost;
public Job() {
super();
}
public Job(Integer st, Integer ed, Integer cost) {
super();
this.st = st;
this.ed = ed;
this.cost = cost;
}
}
class Pair {
public Integer first;
public Integer second;
public Pair() {
super();
}
public Pair(Integer first, Integer second) {
super();
this.first = first;
this.second = second;
}
}
class SortingJobs implements Comparator < Job > {
@Override
public int compare(Job o1, Job o2) {
if (o1.ed < o2.ed) {
return 1;
} else {
return 0;
}
}
}
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
Job[] arr = new Job[n];
int cost;
String st, ed;
int total = 0;
for (int i = 0; i < n; i++) {
st = sc.next();
ed = sc.next();
if (st.length() < 4) {
while (st.length() != 4) {
st += "0";
}
}
if (ed.length() < 4) {
while (ed.length() != 4) {
ed += "0";
}
}
cost = sc.nextInt();
arr[i] = new Job();
arr[i].st = getTime(st);
arr[i].ed = getTime(ed);
arr[i].cost = cost;
total += cost;
}
Arrays.sort(arr, new SortingJobs());
Pair res = new Pair();
res = solve(arr, n);
if (res == null) {
System.out.println(0);
} else {
System.out.println(n - res.first);
System.out.println(total - res.second);
}
}
private static Pair solve(Job[] arr, int n) {
if (n == 0) {
return null;
}
int dp[] = new int[n];
int numOfJobs[] = new int[n];
for (int i = 0; i < n; i++) {
dp[i] = 0;
numOfJobs[i] = 0;
}
dp[0] = arr[0].cost;
numOfJobs[0] = 1;
for (int i = 1; i < n; i++) { int curr = arr[i].cost; int num = 1; int idx = searchJob(arr, 0, i - 1, arr[i].st); if (idx != curr && idx != -1) { curr += dp[idx]; num += numOfJobs[idx]; } if (curr > dp[i - 1]) {
dp[i] = curr;
numOfJobs[i] = num;
} else {
dp[i] = dp[i - 1];
numOfJobs[i] = numOfJobs[i - 1];
}
}
return new Pair(numOfJobs[n - 1], dp[n - 1]);
}
private static int searchJob(Job[] arr, int st, int ed, int key) {
int ans = -1;
while (st <= ed) {
int mid = (st + ed) / 2;
if (arr[mid].ed <= key) {
ans = mid;
st = mid + 1;
} else {
ed = mid - 1;
}
}
return ans;
}
private static int getTime(String st) {
int hr = (st.charAt(0) - '0') * 10 + (st.charAt(1) - '0');
int min = (st.charAt(2) - '0') * 10 + (st.charAt(3) - '0');
return hr * 60 + min;
}
}
Question 2 : k^{th} Largest factor of N
Problem Description
Question -: A positive integer d is said to be a factor of another positive integer N if when N is divided by d, the remainder obtained is zero. For example, for number 12, there are 6 factors 1, 2, 3, 4, 6, 12. Every positive integer k has at least two factors, 1 and the number k itself.Given two positive integers N and k, write a program to print the kth largest factor of N.
Input Format: The input is a comma-separated list of positive integer pairs (N, k).
Output Format: The k^{th} highest factor of N. If N does not have k factors, the output should be 1.Constraints:
1<N<10000000000
1<k<600.
You can assume that N will have no prime factors which are larger than 13.Example 1
Input: 12,3
Output: 4
Explanation: N is 12, k is 3. The factors of 12 are (1,2,3,4,6,12). The highest factor is 12 and the third largest factor is 4. The output must be 4.
Example 2
Input: 30,9
Output: 1
Explanation: N is 30, k is 9. The factors of 30 are (1,2,3,5,6,10,15,30). There are only 8 factors. As k is more than the number of factors, the output is 1.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int number,r,i,count=0;
number = sc.nextInt();
r = sc.nextInt();
for (i = number; i >= 1; i--)
{
if((number%i)==0)
count++;
if(count==r)
{
System.out.println(i);
break;
}
}
if(count!=r)
System.out.println(1);
}
}
number, k = [int(i) for i in input().split(",")]
factor = []
count = 0
for i in range(1, number+1):
if number % i == 0:
count = count + 1
factor.append(i)
if count < k:
print("1")
else:
print(factor[k])
Output
12,3
4
Question 3 : Street Light
Street Lights are installed at every position along a 1-D road of length n.
Locations[] (an array) represents the coverage limit of these lights. The ith light has a coverage limit of locations[i] that can range from the position max((i – locations[i]), 1) to min((i + locations[i]), n ) (Closed intervals). Initially all the lights are switched off. Find the minimum number of fountains that must be switched on to cover the road.
Example
n = 3
locations[] = {0, 2, 13}then
For position 1: locations[1] = 0, max((1 – 0),
1) to mini (1+0), 3) gives range = 1 to 1
For position 2: locations[2] = 2, max((2-2),
1) to min( (2+2), 3) gives range = 1 to 3
For position 3: locations[3] = 1, max( (3-1),
1) to min( (3+1), 3) gives range = 2 to 3
For the entire length of this road to be covered, only the light at position 2 needs to be activated.
Function Description
Returns
int: the minimum number of street lights that must be activated
#include <bits/stdc++.h>
#define ll long long
using namespace std;
bool compare(pair<int, int> A, pair<int, int> B)
{
if (A.first = B.first)
return A.second < B.second;
return A.first < B.first;
}
int solve(int location[], int n)
{
pair<int, int> range[n];
for (int i = 0; i < n; i++)
{
int id = i + 1;
range[i].first = max(1, id - location[i]);
range[i].second = min(n, id + location[i]);
}
sort(range, range + n, compare);
int i = 0;
int ans = 0;
while (i < n)
{
pair<int, int> p = range[i];
ans++;
while (i + 1 < n && range[i].first == range[i + 1].first)
{
p.second = max(p.second, range[i + 1].second);
i++;
}
//cout<<p.second<<" "<<i<<endl;
while (i < n && range[i].second <= p.second)
i++;
//cout<<p.second<<" "<<i<<endl; } return ans; } int main() { int n; cin >> n;
int location[n];
for (int i = 0; i < n; i++) cin >> location[i];
cout << solve(location, n) << endl;
return 0;
}
Question 4 : Self Sufficient
Problem Statement – Abhijeet is one of those students who tries to get his own money by part time jobs in various places to fill up the expenses for buying books. He is not placed in one place, so what he does, he tries to allocate how much the book he needs will cost, and then work to earn that much money only. He works and then buys the book respectively. Sometimes he gets more money than he needs so the money is saved for the next book. Sometimes he doesn’t. In that time, if he has stored money from previous books, he can afford it, otherwise he needs money from his parents.
Now His parents go to work and he can’t contact them amid a day. You are his friend, and you have to find how much money minimum he can borrow from his parents so that he can buy all the books.
He can Buy the book in any order.
Function Description:
Complete the function with the following parameters:
Name
Type
Description
N
Integer
How many Books he has to buy that day.
EarnArray[ ]
Integer array
Array of his earnings for the ith book
CostArray[ ]
Integer array
Array of the actual cost of the ith book.
Constraints:
1 <= N <= 10^3
1 <= EarnArray[i] <= 10^3
1 <= CostArray[i] <= 10^3
Input Format:
First line contains N.
Second N lines contain The ith earning for the ith book.
After that N lines contain The cost of the ith book.
Output Format: The minimum money he needs to cover the total expense.
Sample Input 1:
3
[3 4 2]
[5 3 4]
Sample Output 1:
3
Explanation:
At first he buys the 2nd book, which costs 3 rupees, so he saves 1 rupee. Then he buys the 1st book, that takes 2 rupees more. So he spends his stored 1 rupee and hence he needs 1 rupee more. Then he buys the last book.
n=int(input())
L1=[0] *n
L2=[0]*n
for i in range(n):
L2[i]=int(input())
for i in range(n):
L1[i]=int(input())
for i in range(n):
L2[i]=L2[i]-L1[i];
L2.sort()
su=0
ans=0
for i in range(n):
su=su+L2[i]
if su<0:
ans = ans + abs(su)
su=0
print(ans)
import java.util.*;
class Main
{
public static void main(String args[])
{
Scanner sc = new Scanner (System.in);
int n=sc.nextInt();
int arr1[]= new int[n];
int arr2[]= new int[n];
for(int i=0; i<n; i++)
arr2[i]=sc.nextInt();
for(int i=0; i<n; i++)
arr1[i]=sc.nextInt();
for(int i=0; i<n; i++) arr2[i] -= arr1[i]; Arrays.sort(arr2); int sum=0, ans=0; for(int i=n-1; i>=0; i--)
{
sum+=arr2[i];
if(sum<0)
{
sum = -sum;
ans= ans +sum ;
sum=0;
}
}
System.out.println(ans);
}
}
Question 5 : Maneuvering a Cave Problem
Problem Description
The task is to count all the possible paths from top left to bottom right of a m x n matrix with the constraints that from each cell you can either move only to right or down.
Input:
First line consists of T test cases. First line of every test case consists of N and M, denoting the number of rows and number of columns respectively.
Output:
Single line output i.e count of all the possible paths from top left to bottom right of a m x n matrix..
#include<stdio.h>
int calc(int x, int y) ;
int main()
{
int a,b;
printf("Enter the number of rows of the matrix : ");
scanf("%d",&a);
printf("Enter the number of columns of the matrix : ");
scanf("%d",&b);
printf("%d", calc(a,b));
return 0;
}
int calc(int x, int y)
{
if (x == 1 || y == 1)// If there is a singular matrix
{
return 1;
}
else
{
return calc(x - 1, y) + calc(x, y - 1);
}
}
Output
Enter the number of rows of the matrix : 3
Enter the number of columns of the matrix : 3
6
#include<bits/stdc++.h>
using namespace std;
int calc(int x, int y) ;
int main()
{
int a,b,n;
cout<<("Enter the number of test cases");
cin>>n;
while(n!=0)
{
cout<<("Enter the number of rows of the matrix : ");
cin>>a;
cout<<("Enter the number of columns of the matrix : ");
cin>>b;
cout << "Number of ways - "<< calc(a,b)<<"\n";
n--;
}
return 0;
}
int calc(int x, int y)
{
if (x == 1 || y == 1)// If there is a singular matrix
{
return 1;
}
else
{
return calc(x - 1, y) + calc(x, y - 1);
}
}
Output
Enter the number of test cases
2
Enter the number of rows of the matrix : 2
Enter the number of columns of the matrix : 2
Number of ways - 2
Enter the number of rowa of the matrix : 3
Enter the number of columns of the matrix : 3
Number of ways - 6
import java.util.Scanner;
public class Main {
static int path(int m , int n) {
if(m==1 || n==1)
return 1;
return path(m-1,n)+path(m,n-1);
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a,b,c;
System.out.println("Enter test cases : ");
c=sc.nextInt();
while(c-- > 0)
{
System.out.println("Enter number of rows and columns : ");
a=sc.nextInt();
b=sc.nextInt();
System.out.println(path(a,b));
}
}
}
Output
Enter number of test cases :
2
Enter number of rows and columns :
3
3
6
Enter number of rows and columns :
4
2
4
a = int(input())
b = int(input())
def calculate(a, b):
if a == 1 or b == 1:
return 1
else:
return calculate(a - 1, b) + calculate(a, b - 1)
print(calculate(a, b))
Output
3
3
6
FAQs related to WatchGuard Coding Questions
Question 1: How many rounds are there in WatchGuard Recruitment Process?
After, 1st Round (i.e. Coding Assessments) 2 Rounds of Technical Interviews are conducted, followed by H.R Interview and Managerial Discussion.
Question 2: Is Coding questions asked in WatchGuard Recruitment Process?
Yes, the 1st Round of WatchGuard Recruitment Process is conducted as Online Coding Test.
Question 3: What is the Eligibility Criteria for the WatchGuard Recruitment Process?
Minimum 70% or Equivalent C.G.P.A. is required throughout the academics.
Login/Signup to comment