Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare Paths of Two Files #27

Open
dorakit opened this issue Oct 8, 2022 · 0 comments
Open

Compare Paths of Two Files #27

dorakit opened this issue Oct 8, 2022 · 0 comments

Comments

@dorakit
Copy link
Owner

dorakit commented Oct 8, 2022

Input:

path1 = "/a/b/c" , path2 = "/a/b/"

Output:

path1 is greater than path2

kingrishabdugar added a commit to kingrishabdugar/STL that referenced this issue Oct 8, 2022
Using built-in compare function :

    To store paths use string as data type 
    Use pathname1. Compare( pathname2 ), to compare two paths , this will return three values  greater that 0 , less than 0 or equal to 0
kingrishabdugar added a commit to kingrishabdugar/STL that referenced this issue Oct 8, 2022
dorakit added a commit that referenced this issue Oct 8, 2022
kingrishabdugar added a commit to kingrishabdugar/STL that referenced this issue Oct 8, 2022
dorakit#27 method 2
Using iteration(for & while loop) :

    To store paths use string as data type
    Use for or while loop and compare each character of them one by one.
dorakit added a commit that referenced this issue Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant