All BSD licenses start with the following paragraph:
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
What does the part "with modifications" mean legally? Common sense suggests that if you fixed a typo or added a function/argument/type, then this is a modification. But what about the following:
- You completely rewrote everything and changed every single line. Is it still modification? Even if there's nothing left from the original code?
- You haven't copied the code but implemented it on your own (by memory or reading slides from someone's presentation). Is it still considered a modification?
- You were inspired by some code and wrote your own version of the solution from scratch. Something can be similar but it's an entirely different solution. Is it still a modification?