class Example{ public static void main(String[] args) { String s = " fly me to the moon "; String[] str = s.split(" "); int n = str.length; String s1=str[n-1]; System.out.println(s1.length()); } }
def longest_consecutive(nums): store = set() for i in nums: store.add(i) for n in nums: if n-1 in store: continue else: length = 0 while n+length in store: length+=1 length_max = 0 length_max = max(length_max, length) return length_max
In question 9 if we put if condition insted of while then it also works. Can anyone explain why we are using while loop insted of if condition. public static int longestSubstringLength(String s) { Set set = new HashSet(); int max = 0; int start = 0;
class Example{
public static void main(String[] args) {
String s = " fly me to the moon ";
String[] str = s.split(" ");
int n = str.length;
String s1=str[n-1];
System.out.println(s1.length());
}
}
use s.trim().split("\\s+") for safety and to cover more range for this type of questions
that is a regex inside split, for one or more spaces
please please please make a video on taking input ....that is must required for us .
def longest_consecutive(nums):
store = set()
for i in nums:
store.add(i)
for n in nums:
if n-1 in store:
continue
else:
length = 0
while n+length in store:
length+=1
length_max = 0
length_max = max(length_max, length)
return length_max
Bhai plz test case input Lena sikhao
Please bhaiya!! Make a dedicated video on input taking .. 🙂
Love from Kolkata ❤
Will do soon
Brother, can you please do a coding session on subarrays, subsequences (of both strings and arrays)
Bhai hum first wale question mai loop ulta bhi chala sakte hai rather than pure string to traverse karne ke jagah
My logic: I added a space in the beginning after trim() (in case a single sword is given)...then I traversed from str.length - 1 to the first space
@@SayanKarmakar same bhai , but isme ek edge case aa sakta haii when u have multiple spaces in the last of indix of string
@@ShubhamKumar-me7py haa so that's why I am trimming the string, usse sab extra spaces end me trim off ho jayenge...
31:25 please need a video clarifying this taking input test case with vscode. Didn't understand this.
In question 9 if we put if condition insted of while then it also works.
Can anyone explain why we are using while loop insted of if condition.
public static int longestSubstringLength(String s) {
Set set = new HashSet();
int max = 0;
int start = 0;
for(int end=0;end
please make video for taking input ..........
More accenture coding videos please in c++
in the Accenture coding assessment do we just have to write the function or the entire code from scratch?
If you found your query then please tell us also
bhayya python me karsakthe he na by using builtin functions in accenture coding round?
Please make a video on How to take an input from the user
Will do soon
make a reasoning oneshot
bhai ab tcs pe bhi aase one shot coding video bana do jese accenture ka basic and advanced ke liye banaya!!!!
Sure 👍
sir please do story based questions as asked in accenture
Already uploaded: ruclips.net/video/mJORqJMK46M/видео.htmlsi=zu9zu4sxgnDgvw0Q
Guys koi help kr do please I am not able to apply in accenture on it's portal whenever I am trying to apply its not proceeding further...😥😥
On campus dates???
Accenture Coding PDF pls.............
Accenture coding pdf sir❤.
Itna straight forward question nahi ata bhaiyaaa
Bohut lamba lamba story de jati haa
Focus on logic , problem solving not the length of the question. Length of question is large but same type of logic applied.
Yes
Accenture coding pdf in python plzzz
12:00
18:02
Accenture Coding PDF
Accenture PDF
itne difficult questions bhi aate hain kya?
I think no
coding pdf sir
mai chutiya hu bhai mujhe bas khudki aukat layak job dilwa do ab aur nhi hoti berojgari
Accenture coding pdf
Accenture coding pdf
Accenture coding pdf
accenture pdf
Accenture coding pdf
Accenture Coding PDF
accenture coding pdf
coding pdf
Accenture coding pdf
Accenture coding pdf
accenture coding pdf
Accenture coding pdf
accenture coding pdf
Accenture coding pdf
Accenture coding pdf
Accenture coding pdf
Accenture coding pdf
Accenture coding pdf
accenture coding pdf