WatchGuard Coding Questions
WatchGuard Coding Questions 2023
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.
- Structured Streaming Analytics Technologies: Spark, Flink, Kinesis Analytics.
- Proficiency in databases: MySQL, ElasticSearch, DynamoDB, MSSQL, Document DB.
- Primary language (one or more): Go, Python, JavaScript/Angular.
- Secondary language (zero or more): Java, C++, Scala, C#.
- AWS services (EC2, ECS, Lambdas, S3, API Gateway, RDS, Aurora, CloudFront, SNS/SQS).
Azure & .Net Profile (Full Stack Developer)
- 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.
For your reference and understanding we have given further details of the WatchGuard Recruitment Process in following Tabular form :
WatchGuard | Important Information |
---|---|
Position : |
|
Course : |
|
Eligibility Criteria / Academic Qualification Required : | Minimum 70 % throughout 10th, 12th and Graduation. |
Cost to Company (CTC) |
|
Selection Process : |
|
Joining Location : | Noida |
No. Of Position : | 20 |
Related Banners
Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription
Practice WatchGuard Coding Questions and Answers
Question 1 :
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.
#include<bits/stdc++.h> using namespace std; class job { public: int st, ed, cost; }; int getTime(string s) { int hr = (s[0] - '0') * 10 + (s[1] - '0'); int min = (s[2] - '0') * 10 + (s[3] - '0'); return hr * 60 + min; } bool compare(job A, job B) { return A.ed < B.ed; } 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; } pair < int, int > solve(job arr[], int n) { int dp[n] = { 0 }; int numOfJobs[n] = { 0 }; dp[0] = arr[0].cost; numOfJobs[0] = 1; for (int i = 1; i < n; i++) { int cur = arr[i].cost; int num = 1; int idx = searchJob(arr, 0, i - 1, arr[i].st); if (idx != cur) { cur += dp[idx]; num += numOfJobs[idx]; } if (cur > dp[i - 1]) { dp[i] = cur; numOfJobs[i] = num; } else { dp[i] = dp[i - 1]; numOfJobs[i] = numOfJobs[i - 1]; } } return { numOfJobs[n - 1], dp[n - 1] }; } int main() { int n; cin >> n; job arr[n]; int cost; string st, ed; int total = 0; for (int i = 0; i < n; i++) { cin >> st >> ed >> cost; arr[i].st = getTime(st); arr[i].ed = getTime(ed); arr[i].cost = cost; total += cost; } sort(arr, arr + n, compare); pair < int, int > res = solve(arr, n); cout << n - res.first << endl; cout << total - res.second << endl; return 0; }
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 : kth 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 kth highest factor of N. If N does not have k factors, the output should be 1. Constraints:- 1<N<10000000000
- 1<k<600.
- 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
#include<stdio.h> void main() { int number,pos_of_factor,i,c=0; scanf("%d",&number); scanf("%d",&pos_of_factor); for(i=number;i>=1;i--) { if((number%i)==0) c++; if(c==pos_of_factor) { printf("%d",i); break; } } if(c<pos_of_factor) printf("1"); }
Output 12,3 4
#include<bits/stdc++.h> using namespace std; int main() { int number,pos_of_factor,i,c=0; cin>>number; cin>>pos_of_factor; for(i=number;i>=1;i--) { if((number%i)==0) c++; if(c==pos_of_factor) { cout<<i; break; } } if(c<pos_of_factor) cout<<1; return 0; }
Output 12,3 4
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); } }
Output 12,3 4
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
Constraints
- 1<_n<_ 10^5
- O<_locations[i] <_ mini (n,100) (where 1 <_1<_
10^5)
► Input Format For Custom Testing
Sample Case 0
Sample Input For Custom Testing
3 ->locations[] size n = 3
1 ->locations[] [1, 1, 1]
1 ->Sample Output
Sample Output
1
#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.
#include<bits/stdc++.h> using namespace std; int main() { int n, ans =0,sum=0; cin>>n; vector arr1(n),arr2(n); for(int i=0;i<n;i++) cin>>arr2[i]; for(int i=0;i<n;i++) cin>>arr1[i]; for(int i=0;i<n;i++) arr2[i]-=arr1[i]; sort(arr2.begin(),arr2.end(),greater()); for(int i=0;i<n;i++) { sum+=arr2[i]; if(sum<0) {ans+=abs(sum);sum=0;} } cout<<ans; }
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..
Constraints:
- 1<=T<=100
- 1<=N<=100
- 1<=M<=100
#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.
Get over 200+ course One Subscription
Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others
Login/Signup to comment