{"id":52,"date":"2009-03-18T04:44:05","date_gmt":"2009-03-18T11:44:05","guid":{"rendered":"http:\/\/truelogic.org\/wordpress\/?p=52"},"modified":"2009-03-18T04:44:05","modified_gmt":"2009-03-18T11:44:05","slug":"linked-list-class-in-javascript","status":"publish","type":"post","link":"https:\/\/truelogic.org\/wordpress\/2009\/03\/18\/linked-list-class-in-javascript\/","title":{"rendered":"Linked List class in Javascript"},"content":{"rendered":"<p>This\u00a0 is an exercise in using the object oriented concepts in Javascript to implement a doubly linked list.<\/p>\n<p>There is a class called Node which encapsulates the actual node in the list. The linked list is implemented as a global object with class variables and methods to:<\/p>\n<ul>\n<li>Add a node<\/li>\n<li>Remove a node<\/li>\n<li>Search for a node<\/li>\n<li>Sort the list in ascending order<\/li>\n<li>Display the entire list<\/li>\n<\/ul>\n<p>The Node object simply stores a string. There is scope for further improvement, as always. The source is easily available by viewing the page source. Any comments and recommendations for changes or improvements are welcome.<\/p>\n<p style=\"text-align: center;\"><a title=\"Linked List\" href=\"http:\/\/www.truelogic.org\/blogpages\/linkedlist.html\" target=\"_blank\">You can see the implementation here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>This\u00a0 is an exercise in using the object oriented concepts in Javascript to implement a doubly linked list. There is a class called Node which <a class=\"mh-excerpt-more\" href=\"https:\/\/truelogic.org\/wordpress\/2009\/03\/18\/linked-list-class-in-javascript\/\" title=\"Linked List class in Javascript\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[36,68,156,168,169,171,257],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-amit","tag-class","tag-javascript-2","tag-linked","tag-linked-list","tag-list","tag-truelogic"],"_links":{"self":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":0,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"wp:attachment":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}