Short answer to the question is "NO".
Jesus answers the Pharisees' question about the greatest commandment in Matthew 22:37-40;
37 Jesus replied: “‘Love the Lord your God with all your heart and with all your soul and with all your mind.’ 38 This is the first and greatest commandment. 39 And the second is like it: ‘Love your neighbor as yourself.’ 40 All the Law and the Prophets hang on these two commandments.”
Now let's examine the young man in Matthew 19:16-22. He came to Jesus seeking eternal life, not out of love for God, but to secure his well-being after his wealth. So when Jesus challenges him to give away all his possessions to the poor to demonstrate his commitment to perfection, he fails to do so.
As a result, he fails the greatest commandment to love God, as well as the second to love his neighbor.
Furthermore, the young man's actions were aimed at adhering to the law. The full revelation of Christian faith had not yet occurred before Jesus' ascension. It is also important to note that salvation is achieved through repentance of sin and faith in Jesus Christ, not by one's own perfection.