8 April 2023
10 April 2023
14 April 2023
16 April 2023
18 April 2023
21 April 2023
Coding Tree
Replymessage unavailableZenser, wipro, cognizant, Tibko, etc entry is main
Badme experience leke switch marna
Pesa hi pesa....
22 April 2023
Problem Statement 18:
Prakhar has a strings of length n containing only characters "J"L" and "R". He wants to find the length of the smallest substring, which satisfies the following condition:
Length of the substring is at least 2 'J' occurs strictly more times in this substring than 'L'. 'J' occurs strictly more times in this substring than 'R'
Prakhar is busy planning designs in Jaguar F-Pace, help
him solve the problem.
A substring is a contigudus sequence of characters within a string.
Constraints: length of string s is n and 2 <= n <= 10^6
Input: The first line contains the length of strings i.en Second line contains the strings consisting only letters "", "L" and "R"
Output: print in a single line the length of the smallest substring which satisfies all the above conditions. output-1 if there is no such substring.
Sample Test Case 1:
Input:
2
JJ
Expected Output:
2
Sample Test Case 2:
Input:
8
Expected Output:
3
Sample Test Case 3:
Input:
5
RLJLL
Expected Output: -1
24 April 2023
26 April 2023
27 April 2023
28 April 2023
Siemens is Hiring
Role: Research Analyst - Cybersecurity
Qualification: Bachelor's or Master’s degree
Experience: Fresher's to 1 year of exp.
CTC: 11 to 13 LPA (expected)
Apply Link:
https://www.careerits.in/?m=1
Location: Bangalore
Join @coodingtree on telegram for off campus updates 🔥🔥
1.1K · ReplyWhat u want to know about reactJS
I want to build a small project like making an API class and rendering the data with the use of routing