Searching and returning a word in a sentence in C# without using any inbuilt string functions
Find a word in a sentence, both of which are to be entered by the user. Extra spaces in sentence, at the beginning and the end are to be ignored. Extra spaces in sentence and word both, at the beginning and the end are to be ignored. Extra spaces in sentence, anywhere are to be ignored.For the sentence, you cannot remove spaces from the sentence in a separate loop.
What is the difference between declaring variable arrays in global scope and local scope (inside a method) when they’re in the same class?
Beginner here. What is the difference between declaring an array in the global scope and using it in a method that is in the same class as the array, and declaring the array both in the global scope and in the method? The first way doesn’t work, but the second does, and I can’t find answers as to why.
Time Optimization
I am solving a question on array manipulation on hackerrank. For a particular problem I write this solution. But this solution was ruled out due to timeout for some test cases. Can anyone help me with this please-
What needs to be passed for IEnumerable<KeyValuePair<string, IEnumerable>>?
How can I pass a method an IEnumerable<KeyValuePair<string, IEnumerable<string>>>
c# How to update variable value in loop
I’ve try to loop and from the below code, The problem is when it loop back to “IEnumerable selectedRows =”. The value of DateStart and DateEnd remain the same “9/1/2003 2:00:00” and “9/1/2003 2:59:00” respectively as its initial value. Why the “IEnumerable selectedRows =” do not update the DateTime value? Please help and thank you.