15,881,709 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Aylin Naebzadeh (Top 32 by date)
Aylin Naebzadeh
22-Mar-22 17:30pm
View
NFA stands for non-deterministic finite automata, and DFA stands for deterministic finite automata. There are more information about these two topics in these links:
1 - https://www.geeksforgeeks.org/introduction-of-finite-automata/
2 - https://www.javatpoint.com/deterministic-finite-automata
3 - https://www.javatpoint.com/non-deterministic-finite-automata
Aylin Naebzadeh
22-Mar-22 17:30pm
View
Deleted
NFA stands for non-deterministic finite automata, and DFA stands for deterministic finite automata. There are more information about these two topics in these links:
1 - https://www.geeksforgeeks.org/introduction-of-finite-automata/
2 - https://www.javatpoint.com/deterministic-finite-automata
3 - https://www.javatpoint.com/non-deterministic-finite-automata
Aylin Naebzadeh
12-Dec-21 13:13pm
View
I would try your solution and debug it. Thanks.
Aylin Naebzadeh
10-Dec-21 23:58pm
View
But why the problem has been solved after I pass the parameter of my function as a char[]? Does it mean that a char[] is not read-only like char*?Thanks.
Aylin Naebzadeh
10-Dec-21 16:15pm
View
Thanks🙏. I thought it is no difference between a char* or a char[].
Aylin Naebzadeh
10-Dec-21 15:59pm
View
Thank you for your advice.
Aylin Naebzadeh
27-Nov-21 14:38pm
View
No, I have tried it on paper with both samples. For the second one, I almost understand, but for the first one I did not, but thanks for your help.
Sorry because of my bad questions.
Aylin Naebzadeh
27-Nov-21 14:32pm
View
I calculate these results only in one iteration by using a "for loop".
I mean I check all of the elements only for one time.
And only the value of the two indexes changed(for the last two 1s)
Aylin Naebzadeh
27-Nov-21 14:23pm
View
I think this algorithm does not work correctly for this input:
4 -1 4 1 1
This sequence will be converted to:
4 -1 4 -2 -2
And the max element is 4, but the answer is 3. Am I right?
Are there other steps to calculate the final output in the for loop?
Aylin Naebzadeh
27-Nov-21 12:56pm
View
Sorry, but now in this example -1 0 4 0 3
I start from -1 --> it is negative --> we do not change it
then we check 0 --> the 0th element is -1 --> it is negative --> so should I subtract one from it? but it would remain always negative...
Aylin Naebzadeh
27-Nov-21 12:07pm
View
Sorry, but I did not get your solution. Actually, in this example, the max height becomes 4, not 3🤔. I mean I did not get how did you calculate this sequence:
-1 -2 -4 -2 -3
May you explain more about it?
Aylin Naebzadeh
16-Nov-21 11:55am
View
I have read your article and it helps me to get a better idea about what is happening when we use Add, Remove and Insert methods. Thanks.
Aylin Naebzadeh
30-Oct-21 4:54am
View
Yes, a point can be on more than one segment. I have taken a glance at tests data but unfortunately, they are not sorted. Thank you again.
Aylin Naebzadeh
30-Oct-21 3:47am
View
yes, for example for sample 3, we have 3 segments(which have 2 coordinates) and 2 points(which only have one coordinate) and all of these segments and points are in a horizontal line. Now for this sample point x = 1 is between 2 segments (0,5) and (-3, 2), so the variable count for this point is 2, but for point x = 6, we do not have any segment which includes this point.
Aylin Naebzadeh
30-Oct-21 1:35am
View
You are right. I would think more about it.
Aylin Naebzadeh
30-Oct-21 1:35am
View
Thanks, BillWoodruff. I have checked samples again and I think they are correct. Actually, my code works fine with these samples, but when the number of segments and points become so large no it shows the timeout error to me.
Aylin Naebzadeh
30-Oct-21 1:30am
View
Sorry, but we have been told to solve this question using recursion. You are right, it is not good to use Linq, but what should I use instead?
Aylin Naebzadeh
6-Oct-21 16:44pm
View
Actually, I did not update it🤔.
Aylin Naebzadeh
6-Oct-21 16:44pm
View
That's right👌
Aylin Naebzadeh
30-Sep-21 18:45pm
View
I thought that LINQ and lambdas are faster than for and foreach, but now I understand they are in this case slower and actually they have a hidden loop. And in fact the biggest advantage is that they are easy to read.
Aylin Naebzadeh
30-Sep-21 11:50am
View
I will try it👍
Aylin Naebzadeh
30-Sep-21 10:26am
View
Yes, I have to think more about it.
Aylin Naebzadeh
30-Sep-21 10:25am
View
You are right. I will think more about it.
Aylin Naebzadeh
14-Sep-21 6:40am
View
😅Ok, thanks.
Aylin Naebzadeh
31-Aug-21 11:41am
View
Yes, thank you again.
Aylin Naebzadeh
31-Aug-21 11:13am
View
Thank you, Luc Pattyn. Yes, when I have tried the solution of Wendelius it was a bit slow I think that was because of the recursive strategy. Now if I give an array to the input of this function I should compare the elements two by two using a for loop block am I right?
Aylin Naebzadeh
30-Aug-21 16:20pm
View
Thank you again. Yes, I understood this code just by debugging.
Aylin Naebzadeh
30-Aug-21 14:13pm
View
Thank you, @Wendelius. I am really grateful for your help. Sorry if my question was not clear. So your strategy was to use recursive functions, am I right? because I think you have called your function inside the foreach block.
Aylin Naebzadeh
30-Aug-21 11:28am
View
Hmmmmm🤔🤔🤔no it was not. Something that I want is to find the largest number which can be created by concatenating the elements in the array.
Aylin Naebzadeh
30-Aug-21 3:38am
View
Maybe I did not ask my question in the post clearly. But something that I want from my code is to return the largest number that can be made by concatenating the elements in the array.
Aylin Naebzadeh
30-Aug-21 3:36am
View
Yes, you are right it is obviously better to work with numbers instead of strings😅 , but when I set the digits array = new double[]{ 3, 23, 101, 1 } it prints 1101 in the output🤔
Aylin Naebzadeh
30-Aug-21 3:30am
View
I have tried your code but after sorting this array and when I run the code the output is: 1323101, but the largest that can be made is 3231101🤔am I right?
Show More