{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,12,20]],"date-time":"2025-12-20T09:00:19Z","timestamp":1766221219360,"version":"3.48.0"},"reference-count":33,"publisher":"Walter de Gruyter GmbH","issue":"1","license":[{"start":{"date-parts":[[2025,1,1]],"date-time":"2025-01-01T00:00:00Z","timestamp":1735689600000},"content-version":"unspecified","delay-in-days":0,"URL":"http:\/\/creativecommons.org\/licenses\/by\/4.0"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":[],"published-print":{"date-parts":[[2025,10,10]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>Data structures typically use sequential or hierarchical arrangements of elements. Hierarchical data structures are commonly referred to as trees. Trees can be implemented and applied in various ways from simple to relatively sophisticated structures. Undoubtedly, the most well-known tree structure is the binary tree. Such a tree is essential for efficient implementations of (binary) search trees, which typically provide operations like find, insert, and remove. In addition to these, the operation of tree traversal \u2013 that sequentially accesses all the elements \u2013 is also very important. Data structure libraries mostly implement traversal using the iterator design pattern. The article examines different approaches to implementing an iterator for a binary tree. The article\u2019s main contribution lies in an experimental comparison of various iterator implementations. The comparison also includes an AI-generated iterator. The results show that the simple, straightforward approach commonly used in standard libraries is the fastest and that the AI-generated iterator performs reasonably well.<\/jats:p>","DOI":"10.1515\/comp-2025-0043","type":"journal-article","created":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T08:56:33Z","timestamp":1760172993000},"source":"Crossref","is-referenced-by-count":0,"title":["Comparison of various in-order iterator implementations in C++"],"prefix":"10.1515","volume":"15","author":[{"given":"Michal","family":"Mrena","sequence":"first","affiliation":[{"name":"Department of Informatics, University of Zilina , Zilina , Slovakia"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Michal","family":"Varga","sequence":"additional","affiliation":[{"name":"Department of Informatics, University of Zilina , Zilina , Slovakia"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Miroslav","family":"Kva\u0161\u0161ay","sequence":"additional","affiliation":[{"name":"Department of Informatics, University of Zilina , Zilina , Slovakia"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Marek","family":"Klimo","sequence":"additional","affiliation":[{"name":"Department of Informatics, University of Zilina , Zilina , Slovakia"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"374","published-online":{"date-parts":[[2025,10,10]]},"reference":[{"key":"2025122008514883070_j_comp-2025-0043_ref_001","unstructured":"A. Silberschatz, P. B. Galvin, and G. Gagne, Operating system concepts, 10 edn., Wiley, Hoboken, NJ, USA, 2018."},{"key":"2025122008514883070_j_comp-2025-0043_ref_002","unstructured":"T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to algorithms, 3rd edn., The MIT Press, 2009."},{"key":"2025122008514883070_j_comp-2025-0043_ref_003","doi-asserted-by":"crossref","unstructured":"E. N. Zaitseva and V. G. Levashenko, \u201cConstruction of a reliability structure function based on uncertain data,\u201d IEEE Trans. Reliability, vol. 65, pp. 1710\u20131723, 2016.","DOI":"10.1109\/TR.2016.2578948"},{"key":"2025122008514883070_j_comp-2025-0043_ref_004","doi-asserted-by":"crossref","unstructured":"J. Pia\u0327tkowski and S. Szymoniak, \u201cMethodology of testing the security of cryptographic protocols using the cmmtree framework,\u201d Appl. Sci., vol. 13, no. 23, 12668, 2023.","DOI":"10.3390\/app132312668"},{"key":"2025122008514883070_j_comp-2025-0043_ref_005","doi-asserted-by":"crossref","unstructured":"C. Okasaki, Purely functional data structures, Cambridge University Press, New York, NY, 1998.","DOI":"10.1017\/CBO9780511530104"},{"key":"2025122008514883070_j_comp-2025-0043_ref_006","unstructured":"F. M. Carrano and T. M. Henry, Data abstraction and problem solving with C++: Walls and mirrors, 7th edn., Pearson Addison Wesley, 2017."},{"key":"2025122008514883070_j_comp-2025-0043_ref_007","doi-asserted-by":"crossref","unstructured":"M. Mrena, M. Varga, and M. Kvassay, \u201cComparison of the approaches to the traversal of a binary tree structure using iterators,\u201d In 2024 IEEE 17th International Scientific Conference on Informatics (Informatics), pp. 248\u2013253, 2024.","DOI":"10.1109\/Informatics62280.2024.10900891"},{"key":"2025122008514883070_j_comp-2025-0043_ref_008","unstructured":"M. Varga, M. Kvassay, M. Mrena, V. Klima, A. Kavi\u00e7\u00ef\u00a3\u00a1ka, and N. Adamko, Algoritmy a \u00fadajov\u00e9 \u015ftrukt\u00fary, 2. diel: Abstraktn\u00e9 pam\u00e4t\u2019ov\u00e9 typy a \u0161trukt\u00fary, in slovak. \u017dilinsk\u00e1 Univerzita v \u017diline, EDIS-vydavatel\u2019o UNIZA, 2024, ISBN: 978-80-554-2135-3."},{"key":"2025122008514883070_j_comp-2025-0043_ref_009","unstructured":"M. Varga, M. Kva\u0161ay, M. Mrena, V. Klima, A. Kavi\u00e7\u00ef\u00a3\u00a1ka, and N. Adamko, Algoritmy a \u00fadajov\u00e9 \u0161trukt\u00fary, 3. diel: Abstraktn\u00e9 \u00fadajov\u00e9 typy a \u0161trukt\u00fary, in slovak. \u017dilinsk\u00e1 Univerzita v \u017diline, EDIS-vydavatel\u2019o UNIZA, 2024, ISBN: 978-80-554-2136-0."},{"key":"2025122008514883070_j_comp-2025-0043_ref_010","doi-asserted-by":"crossref","unstructured":"J. A. Bondy and U. S. R. Murty, Graph theory with applications. Elsevier Science Publishing, New York, 1976.","DOI":"10.1007\/978-1-349-03521-2"},{"key":"2025122008514883070_j_comp-2025-0043_ref_011","doi-asserted-by":"crossref","unstructured":"P. F. Windley, \u201cTrees, forests and rearranging,\u201d Comput. J., vol. 3, no. 2, pp. 84\u201388, 1960.","DOI":"10.1093\/comjnl\/3.2.84"},{"key":"2025122008514883070_j_comp-2025-0043_ref_012","unstructured":"D. E. Knuth, The art of computer programming, Volume 3: (2nd ed.) sorting and searching, Addison Wesley Longman Publishing Co., Inc., Redwood City, CA, USA, 1998."},{"key":"2025122008514883070_j_comp-2025-0043_ref_013","unstructured":"java.util.map. 2025. https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/Map.html, Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_014","unstructured":".net dictionary. 2025.https:\/\/learn.microsoft.com\/en-us\/dotnet\/api\/system.collections.generic.dictionary-2?view=net-8.0. Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_015","unstructured":"Python dictionary. 2025. https:\/\/docs.python.org\/3\/tutorial\/datastructures.html#dictionaries, Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_016","unstructured":"Php associative array. https:\/\/www.php.net\/manual\/en\/language.types.array.php, 2025, Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_017","unstructured":"N. Wirth, Algorithms and data structures, Prentice-Hall International editions, Prentice-Hall International, 1986."},{"key":"2025122008514883070_j_comp-2025-0043_ref_018","doi-asserted-by":"crossref","unstructured":"R. Seidel and C. R. Aragon, \u201cRandomized search trees,\u201d Algorithmica, vol. 16, pp. 464\u2013497, 1996.","DOI":"10.1007\/BF01940876"},{"key":"2025122008514883070_j_comp-2025-0043_ref_019","doi-asserted-by":"crossref","unstructured":"D. D. Sleator and R. E. Tarjan, \u201cSelf-adjusting binary search trees,\u201d J. Acm, vol. 32, no. 3, pp. 652\u2013686, 1985.","DOI":"10.1145\/3828.3835"},{"key":"2025122008514883070_j_comp-2025-0043_ref_020","doi-asserted-by":"crossref","unstructured":"L. J. Guibas and R. Sedgewick, \u201cA dichromatic framework for balanced trees,\u201d In: 19th Annual Symposium on Foundations of Computer Science (sfcs 1978), pp. 8\u201321, 1978.","DOI":"10.1109\/SFCS.1978.3"},{"key":"2025122008514883070_j_comp-2025-0043_ref_021","doi-asserted-by":"crossref","unstructured":"G. Hutton, Programming in Haskell, 2nd edn., Cambridge University Press, 2016.","DOI":"10.1017\/CBO9781316784099"},{"key":"2025122008514883070_j_comp-2025-0043_ref_022","unstructured":"E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design patterns: elements of reusable object-oriented software, Addison-Wesley Longman Publishing Co., Inc., USA, 1995."},{"key":"2025122008514883070_j_comp-2025-0043_ref_023","unstructured":"Range-based for loop. 2025. https:\/\/en.cppreference.com\/w\/cpp\/language\/range-for, Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_024","unstructured":"The for-each loop. 2025, https:\/\/docs.oracle.com\/javase\/8\/docs\/technotes\/guides\/language\/foreach.html, Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_025","unstructured":"The foreach statement. 2025, https:\/\/learn.microsoft.com\/en-us\/dotnet\/csharp\/language-reference\/statements\/iteration-statements#the-foreach-statement, Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_026","unstructured":"Iterable.foreach. 2025. https:\/\/docs.oracle.com\/en\/java\/javase\/17\/docs\/api\/java.base\/java\/lang\/Iterable.html#forEach(java.util.function.Consumer), Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_027","unstructured":"Llvm project - libc++. 2025. https:\/\/github.com\/llvm\/llvm-project\/blob\/f11c0a1a0d9306456a99e609833d7b188fa904fb\/libcxx\/include\/__tree#L194, Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_028","unstructured":"Microsoft stl. 2025, https:\/\/github.com\/microsoft\/STL\/blob\/ef1d621d51263285aff8e560a214f5477d63d687\/stl\/inc\/xtree#L49, Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_029","unstructured":"Gcc \u2013 libstdc++. https:\/\/github.com\/gcc-mirror\/gcc\/blob\/6fce4664d4a2e44843bd1464930696c819906d0f\/libstdc%2B%2B-v3\/src\/c%2B%2B98\/tree.cc#L83, 2025. Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_030","unstructured":"Openai\u2019s chatgpt 3.5. 2025. https:\/\/chatgpt.com\/, Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_031","unstructured":"Gemini 2.0. https:\/\/gemini.google.com\/app?hl=sk\/, 2025. Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_032","unstructured":"Microsoft copilot. 2025, https:\/\/copilot.microsoft.com\/, Accessed: 2025-02-24."},{"key":"2025122008514883070_j_comp-2025-0043_ref_033","unstructured":"Deepseek v2.5. 2025, https:\/\/www.deepseek.com\/, Accessed: 2025-02-24."}],"container-title":["Open Computer Science"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.degruyterbrill.com\/document\/doi\/10.1515\/comp-2025-0043\/xml","content-type":"application\/xml","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/www.degruyterbrill.com\/document\/doi\/10.1515\/comp-2025-0043\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,12,20]],"date-time":"2025-12-20T08:57:41Z","timestamp":1766221061000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.degruyterbrill.com\/document\/doi\/10.1515\/comp-2025-0043\/html"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,1,1]]},"references-count":33,"journal-issue":{"issue":"1","published-online":{"date-parts":[[2025,9,17]]},"published-print":{"date-parts":[[2025,9,17]]}},"alternative-id":["10.1515\/comp-2025-0043"],"URL":"https:\/\/doi.org\/10.1515\/comp-2025-0043","relation":{},"ISSN":["2299-1093"],"issn-type":[{"type":"electronic","value":"2299-1093"}],"subject":[],"published":{"date-parts":[[2025,1,1]]},"article-number":"20250043"}}