OpenGenus / cosmos

World's largest Contributor driven code dataset | Used in Quark Search Engine, @OpenGenus IQ, OpenGenus Visual Project
http://internship.opengenus.org
GNU General Public License v3.0
13.53k stars 3.67k forks source link

Update linked_list_palindrome.cpp #6730

Open jvishad opened 8 months ago

jvishad commented 8 months ago

Fixes issue: Reduced the additional space complexity of the code.

Changes: Changed the vector approach to the linked list approach which doesn't use additional vector which saves our extra space.