[{"data":1,"prerenderedAt":3771},["ShallowReactive",2],{"blog-stack-in-golang":3,"blog-all-for-related":3277},{"id":4,"title":5,"author":6,"body":7,"cardAlt":5,"categories":3262,"description":3265,"draft":3266,"extension":3267,"headerImage":3268,"keywords":3269,"meta":3270,"name":3271,"navigation":158,"path":3272,"seo":3273,"series":6,"stem":3274,"updated":6,"year":3275,"__hash__":3276},"blog\u002Fblog\u002Fstack-in-golang.md","Implement Stack in Golang",null,{"type":8,"value":9,"toc":3249},"minimark",[10,14,17,3245],[11,12,13],"p",{},"In this article, you will learn how to implement stack data structure in Golang. In case you are not aware of what stack is, we’ll cover the basics as well. Then, we will dive into implementation of stack in Go.",[11,15,16],{},"Let’s begin!",[18,19,20,23,28,36,39,55,61,64,78,80,84,90,117,344,347,352,355,358,442,444,448,453,602,604,608,611,714,716,720,723,796,798,802,805,874,876,880,883,947,949,953,956,1693,1695,1699,1702,3190],"ads",{},[21,22],"hr",{},[24,25,27],"h2",{"id":26},"what-is-a-stack","What is a Stack?",[11,29,30,31,35],{},"Stack is a linear data structure which follows a particular order named ",[32,33,34],"strong",{},"LIFO (Last in First out)",".",[11,37,38],{},"Stacks is mainly used to perform following operations -",[40,41,42,46,49,52],"ul",{},[43,44,45],"li",{},"Push",[43,47,48],{},"Pop",[43,50,51],{},"Peek\u002FTop",[43,53,54],{},"isEmpty",[11,56,57,58],{},"All the operations stated above takes ",[32,59,60],{},"O(1) time.",[11,62,63],{},"Stack is a useful data structure. Some applications include:",[40,65,66,69,72,75],{},[43,67,68],{},"Conversion from one form of expression to another.",[43,70,71],{},"Used in Memory Management.",[43,73,74],{},"Expression evaluation",[43,76,77],{},"Previous\u002FNext pages in browsers.",[21,79],{},[24,81,83],{"id":82},"stacks-in-go","Stacks in Go",[11,85,86,87,35],{},"In Golang, Stacks can be easily implemented with help of ",[32,88,89],{},"slices",[11,91,92,93,97,98,101,102,104,105,108,109,112,113,116],{},"We first declare ",[94,95,96],"code",{},"Item"," interface which can contain any data type. We define ",[94,99,100],{},"Stack"," struct which contains list of ",[94,103,96],{}," and a ",[94,106,107],{},"mutex"," lock (for concurrency purposes). We don’t want data inconsistency which might result in failure of struct. ",[94,110,111],{},"NewEmptyStack()"," and ",[94,114,115],{},"NewStack()"," are functions to create new stack.",[118,119,124],"pre",{"className":120,"code":121,"language":122,"meta":123,"style":123},"language-go shiki shiki-themes github-light github-dark","\u002F\u002F Item interface to store any data type in stack\ntype Item interface{}\n\n\u002F\u002F Stack struct which contains a list of Items\ntype Stack struct {\n    items []Item\n    mutex sync.Mutex\n}\n\n\u002F\u002F NewEmptyStack() returns a new instance of Stack with zero elements\nfunc NewEmptyStack() *Stack {\n    return &Stack{\n        items: nil,\n    }\n}\n\n\u002F\u002F NewStack() returns a new instance of Stack with list of specified elements\nfunc NewStack(items []Item) *Stack {\n    return &Stack{\n        items: items,\n    }\n}\n","go","",[94,125,126,135,153,160,166,180,189,203,209,214,220,239,253,266,272,277,282,288,317,328,334,339],{"__ignoreMap":123},[127,128,131],"span",{"class":129,"line":130},"line",1,[127,132,134],{"class":133},"sJ8bj","\u002F\u002F Item interface to store any data type in stack\n",[127,136,138,142,146,149],{"class":129,"line":137},2,[127,139,141],{"class":140},"szBVR","type",[127,143,145],{"class":144},"sScJk"," Item",[127,147,148],{"class":140}," interface",[127,150,152],{"class":151},"sVt8B","{}\n",[127,154,156],{"class":129,"line":155},3,[127,157,159],{"emptyLinePlaceholder":158},true,"\n",[127,161,163],{"class":129,"line":162},4,[127,164,165],{"class":133},"\u002F\u002F Stack struct which contains a list of Items\n",[127,167,169,171,174,177],{"class":129,"line":168},5,[127,170,141],{"class":140},[127,172,173],{"class":144}," Stack",[127,175,176],{"class":140}," struct",[127,178,179],{"class":151}," {\n",[127,181,183,186],{"class":129,"line":182},6,[127,184,185],{"class":151},"    items []",[127,187,188],{"class":144},"Item\n",[127,190,192,195,198,200],{"class":129,"line":191},7,[127,193,194],{"class":151},"    mutex ",[127,196,197],{"class":144},"sync",[127,199,35],{"class":151},[127,201,202],{"class":144},"Mutex\n",[127,204,206],{"class":129,"line":205},8,[127,207,208],{"class":151},"}\n",[127,210,212],{"class":129,"line":211},9,[127,213,159],{"emptyLinePlaceholder":158},[127,215,217],{"class":129,"line":216},10,[127,218,219],{"class":133},"\u002F\u002F NewEmptyStack() returns a new instance of Stack with zero elements\n",[127,221,223,226,229,232,235,237],{"class":129,"line":222},11,[127,224,225],{"class":140},"func",[127,227,228],{"class":144}," NewEmptyStack",[127,230,231],{"class":151},"() ",[127,233,234],{"class":140},"*",[127,236,100],{"class":144},[127,238,179],{"class":151},[127,240,242,245,248,250],{"class":129,"line":241},12,[127,243,244],{"class":140},"    return",[127,246,247],{"class":140}," &",[127,249,100],{"class":144},[127,251,252],{"class":151},"{\n",[127,254,256,259,263],{"class":129,"line":255},13,[127,257,258],{"class":151},"        items: ",[127,260,262],{"class":261},"sj4cs","nil",[127,264,265],{"class":151},",\n",[127,267,269],{"class":129,"line":268},14,[127,270,271],{"class":151},"    }\n",[127,273,275],{"class":129,"line":274},15,[127,276,208],{"class":151},[127,278,280],{"class":129,"line":279},16,[127,281,159],{"emptyLinePlaceholder":158},[127,283,285],{"class":129,"line":284},17,[127,286,287],{"class":133},"\u002F\u002F NewStack() returns a new instance of Stack with list of specified elements\n",[127,289,291,293,296,299,303,306,308,311,313,315],{"class":129,"line":290},18,[127,292,225],{"class":140},[127,294,295],{"class":144}," NewStack",[127,297,298],{"class":151},"(",[127,300,302],{"class":301},"s4XuR","items",[127,304,305],{"class":151}," []",[127,307,96],{"class":144},[127,309,310],{"class":151},") ",[127,312,234],{"class":140},[127,314,100],{"class":144},[127,316,179],{"class":151},[127,318,320,322,324,326],{"class":129,"line":319},19,[127,321,244],{"class":140},[127,323,247],{"class":140},[127,325,100],{"class":144},[127,327,252],{"class":151},[127,329,331],{"class":129,"line":330},20,[127,332,333],{"class":151},"        items: items,\n",[127,335,337],{"class":129,"line":336},21,[127,338,271],{"class":151},[127,340,342],{"class":129,"line":341},22,[127,343,208],{"class":151},[11,345,346],{},"Here we implement following functions. Let’s explore them one by one.",[348,349,351],"h3",{"id":350},"push","Push()",[11,353,354],{},"Adds item to stack. If stack if full, this returns overflow error. Here we don’t handle overflow, you can add custom check and handle the error.",[11,356,357],{},"We lock the mutex so that no other changes are made and consistency is maintained (in concurrent environment)",[118,359,361],{"className":120,"code":360,"language":122,"meta":123,"style":123},"\u002F\u002F Push() adds new item to top of existing\u002Fempty stack\nfunc (stack *Stack) Push(item Item) {\n    stack.mutex.Lock()\n    defer stack.mutex.Unlock()\n\n    stack.items = append(stack.items, item)\n}\n",[94,362,363,368,396,407,420,424,438],{"__ignoreMap":123},[127,364,365],{"class":129,"line":130},[127,366,367],{"class":133},"\u002F\u002F Push() adds new item to top of existing\u002Fempty stack\n",[127,369,370,372,375,378,380,382,384,386,388,391,393],{"class":129,"line":137},[127,371,225],{"class":140},[127,373,374],{"class":151}," (",[127,376,377],{"class":301},"stack ",[127,379,234],{"class":140},[127,381,100],{"class":144},[127,383,310],{"class":151},[127,385,45],{"class":144},[127,387,298],{"class":151},[127,389,390],{"class":301},"item",[127,392,145],{"class":144},[127,394,395],{"class":151},") {\n",[127,397,398,401,404],{"class":129,"line":155},[127,399,400],{"class":151},"    stack.mutex.",[127,402,403],{"class":144},"Lock",[127,405,406],{"class":151},"()\n",[127,408,409,412,415,418],{"class":129,"line":162},[127,410,411],{"class":140},"    defer",[127,413,414],{"class":151}," stack.mutex.",[127,416,417],{"class":144},"Unlock",[127,419,406],{"class":151},[127,421,422],{"class":129,"line":168},[127,423,159],{"emptyLinePlaceholder":158},[127,425,426,429,432,435],{"class":129,"line":182},[127,427,428],{"class":151},"    stack.items ",[127,430,431],{"class":140},"=",[127,433,434],{"class":144}," append",[127,436,437],{"class":151},"(stack.items, item)\n",[127,439,440],{"class":129,"line":191},[127,441,208],{"class":151},[21,443],{},[348,445,447],{"id":446},"pop","Pop()",[11,449,450,451,35],{},"Removes item from stack. If stack if empty, this returns ",[94,452,262],{},[118,454,456],{"className":120,"code":455,"language":122,"meta":123,"style":123},"\u002F\u002F Pop() removes most recent item(top) from stack\nfunc (stack *Stack) Pop() Item {\n    stack.mutex.Lock()\n    defer stack.mutex.Unlock()\n\n    if len(stack.items) == 0 {\n        return nil\n    }\n\n    lastItem := stack.items[len(stack.items)-1]\n    stack.items = stack.items[:len(stack.items)-1]\n\n    return lastItem\n}\n",[94,457,458,463,485,493,503,507,526,534,538,542,568,587,591,598],{"__ignoreMap":123},[127,459,460],{"class":129,"line":130},[127,461,462],{"class":133},"\u002F\u002F Pop() removes most recent item(top) from stack\n",[127,464,465,467,469,471,473,475,477,479,481,483],{"class":129,"line":137},[127,466,225],{"class":140},[127,468,374],{"class":151},[127,470,377],{"class":301},[127,472,234],{"class":140},[127,474,100],{"class":144},[127,476,310],{"class":151},[127,478,48],{"class":144},[127,480,231],{"class":151},[127,482,96],{"class":144},[127,484,179],{"class":151},[127,486,487,489,491],{"class":129,"line":155},[127,488,400],{"class":151},[127,490,403],{"class":144},[127,492,406],{"class":151},[127,494,495,497,499,501],{"class":129,"line":162},[127,496,411],{"class":140},[127,498,414],{"class":151},[127,500,417],{"class":144},[127,502,406],{"class":151},[127,504,505],{"class":129,"line":168},[127,506,159],{"emptyLinePlaceholder":158},[127,508,509,512,515,518,521,524],{"class":129,"line":182},[127,510,511],{"class":140},"    if",[127,513,514],{"class":144}," len",[127,516,517],{"class":151},"(stack.items) ",[127,519,520],{"class":140},"==",[127,522,523],{"class":261}," 0",[127,525,179],{"class":151},[127,527,528,531],{"class":129,"line":191},[127,529,530],{"class":140},"        return",[127,532,533],{"class":261}," nil\n",[127,535,536],{"class":129,"line":205},[127,537,271],{"class":151},[127,539,540],{"class":129,"line":211},[127,541,159],{"emptyLinePlaceholder":158},[127,543,544,547,550,553,556,559,562,565],{"class":129,"line":216},[127,545,546],{"class":151},"    lastItem ",[127,548,549],{"class":140},":=",[127,551,552],{"class":151}," stack.items[",[127,554,555],{"class":144},"len",[127,557,558],{"class":151},"(stack.items)",[127,560,561],{"class":140},"-",[127,563,564],{"class":261},"1",[127,566,567],{"class":151},"]\n",[127,569,570,572,574,577,579,581,583,585],{"class":129,"line":222},[127,571,428],{"class":151},[127,573,431],{"class":140},[127,575,576],{"class":151}," stack.items[:",[127,578,555],{"class":144},[127,580,558],{"class":151},[127,582,561],{"class":140},[127,584,564],{"class":261},[127,586,567],{"class":151},[127,588,589],{"class":129,"line":241},[127,590,159],{"emptyLinePlaceholder":158},[127,592,593,595],{"class":129,"line":255},[127,594,244],{"class":140},[127,596,597],{"class":151}," lastItem\n",[127,599,600],{"class":129,"line":268},[127,601,208],{"class":151},[21,603],{},[348,605,607],{"id":606},"top","Top()",[11,609,610],{},"This function returns the last inserted item from stack. This doesn’t remove item from stack.",[118,612,614],{"className":120,"code":613,"language":122,"meta":123,"style":123},"\u002F\u002F Top() returns the last inserted item in stack without removing it.\nfunc (stack *Stack) Top() Item {\n    stack.mutex.Lock()\n    defer stack.mutex.Unlock()\n\n    if len(stack.items) == 0 {\n        return nil\n    }\n\n    return stack.items[len(stack.items)-1]\n}\n",[94,615,616,621,644,652,662,666,680,686,690,694,710],{"__ignoreMap":123},[127,617,618],{"class":129,"line":130},[127,619,620],{"class":133},"\u002F\u002F Top() returns the last inserted item in stack without removing it.\n",[127,622,623,625,627,629,631,633,635,638,640,642],{"class":129,"line":137},[127,624,225],{"class":140},[127,626,374],{"class":151},[127,628,377],{"class":301},[127,630,234],{"class":140},[127,632,100],{"class":144},[127,634,310],{"class":151},[127,636,637],{"class":144},"Top",[127,639,231],{"class":151},[127,641,96],{"class":144},[127,643,179],{"class":151},[127,645,646,648,650],{"class":129,"line":155},[127,647,400],{"class":151},[127,649,403],{"class":144},[127,651,406],{"class":151},[127,653,654,656,658,660],{"class":129,"line":162},[127,655,411],{"class":140},[127,657,414],{"class":151},[127,659,417],{"class":144},[127,661,406],{"class":151},[127,663,664],{"class":129,"line":168},[127,665,159],{"emptyLinePlaceholder":158},[127,667,668,670,672,674,676,678],{"class":129,"line":182},[127,669,511],{"class":140},[127,671,514],{"class":144},[127,673,517],{"class":151},[127,675,520],{"class":140},[127,677,523],{"class":261},[127,679,179],{"class":151},[127,681,682,684],{"class":129,"line":191},[127,683,530],{"class":140},[127,685,533],{"class":261},[127,687,688],{"class":129,"line":205},[127,689,271],{"class":151},[127,691,692],{"class":129,"line":211},[127,693,159],{"emptyLinePlaceholder":158},[127,695,696,698,700,702,704,706,708],{"class":129,"line":216},[127,697,244],{"class":140},[127,699,552],{"class":151},[127,701,555],{"class":144},[127,703,558],{"class":151},[127,705,561],{"class":140},[127,707,564],{"class":261},[127,709,567],{"class":151},[127,711,712],{"class":129,"line":222},[127,713,208],{"class":151},[21,715],{},[348,717,719],{"id":718},"isempty","IsEmpty()",[11,721,722],{},"This function checks whether the stack is empty or not. Returns boolean result based on the state of stack.",[118,724,726],{"className":120,"code":725,"language":122,"meta":123,"style":123},"\u002F\u002F IsEmpty() returns whether the stack is empty or not (boolean result)\nfunc (stack *Stack) IsEmpty() bool {\n    stack.mutex.Lock()\n    defer stack.mutex.Unlock()\n\n    return len(stack.items) == 0\n}\n",[94,727,728,733,757,765,775,779,792],{"__ignoreMap":123},[127,729,730],{"class":129,"line":130},[127,731,732],{"class":133},"\u002F\u002F IsEmpty() returns whether the stack is empty or not (boolean result)\n",[127,734,735,737,739,741,743,745,747,750,752,755],{"class":129,"line":137},[127,736,225],{"class":140},[127,738,374],{"class":151},[127,740,377],{"class":301},[127,742,234],{"class":140},[127,744,100],{"class":144},[127,746,310],{"class":151},[127,748,749],{"class":144},"IsEmpty",[127,751,231],{"class":151},[127,753,754],{"class":140},"bool",[127,756,179],{"class":151},[127,758,759,761,763],{"class":129,"line":155},[127,760,400],{"class":151},[127,762,403],{"class":144},[127,764,406],{"class":151},[127,766,767,769,771,773],{"class":129,"line":162},[127,768,411],{"class":140},[127,770,414],{"class":151},[127,772,417],{"class":144},[127,774,406],{"class":151},[127,776,777],{"class":129,"line":168},[127,778,159],{"emptyLinePlaceholder":158},[127,780,781,783,785,787,789],{"class":129,"line":182},[127,782,244],{"class":140},[127,784,514],{"class":144},[127,786,517],{"class":151},[127,788,520],{"class":140},[127,790,791],{"class":261}," 0\n",[127,793,794],{"class":129,"line":191},[127,795,208],{"class":151},[21,797],{},[348,799,801],{"id":800},"size","Size()",[11,803,804],{},"This function returns number of elements currently in the stack.",[118,806,808],{"className":120,"code":807,"language":122,"meta":123,"style":123},"\u002F\u002F Size() returns the number of items currently in the stack\nfunc (stack *Stack) Size() int {\n    stack.mutex.Lock()\n    defer stack.mutex.Unlock()\n\n    return len(stack.items)\n}\n",[94,809,810,815,839,847,857,861,870],{"__ignoreMap":123},[127,811,812],{"class":129,"line":130},[127,813,814],{"class":133},"\u002F\u002F Size() returns the number of items currently in the stack\n",[127,816,817,819,821,823,825,827,829,832,834,837],{"class":129,"line":137},[127,818,225],{"class":140},[127,820,374],{"class":151},[127,822,377],{"class":301},[127,824,234],{"class":140},[127,826,100],{"class":144},[127,828,310],{"class":151},[127,830,831],{"class":144},"Size",[127,833,231],{"class":151},[127,835,836],{"class":140},"int",[127,838,179],{"class":151},[127,840,841,843,845],{"class":129,"line":155},[127,842,400],{"class":151},[127,844,403],{"class":144},[127,846,406],{"class":151},[127,848,849,851,853,855],{"class":129,"line":162},[127,850,411],{"class":140},[127,852,414],{"class":151},[127,854,417],{"class":144},[127,856,406],{"class":151},[127,858,859],{"class":129,"line":168},[127,860,159],{"emptyLinePlaceholder":158},[127,862,863,865,867],{"class":129,"line":182},[127,864,244],{"class":140},[127,866,514],{"class":144},[127,868,869],{"class":151},"(stack.items)\n",[127,871,872],{"class":129,"line":191},[127,873,208],{"class":151},[21,875],{},[348,877,879],{"id":878},"clear","Clear()",[11,881,882],{},"This function removes all elements from stack. Basically empties the stack by setting it to empty object.",[118,884,885],{"className":120,"code":807,"language":122,"meta":123,"style":123},[94,886,887,891,913,921,931,935,943],{"__ignoreMap":123},[127,888,889],{"class":129,"line":130},[127,890,814],{"class":133},[127,892,893,895,897,899,901,903,905,907,909,911],{"class":129,"line":137},[127,894,225],{"class":140},[127,896,374],{"class":151},[127,898,377],{"class":301},[127,900,234],{"class":140},[127,902,100],{"class":144},[127,904,310],{"class":151},[127,906,831],{"class":144},[127,908,231],{"class":151},[127,910,836],{"class":140},[127,912,179],{"class":151},[127,914,915,917,919],{"class":129,"line":155},[127,916,400],{"class":151},[127,918,403],{"class":144},[127,920,406],{"class":151},[127,922,923,925,927,929],{"class":129,"line":162},[127,924,411],{"class":140},[127,926,414],{"class":151},[127,928,417],{"class":144},[127,930,406],{"class":151},[127,932,933],{"class":129,"line":168},[127,934,159],{"emptyLinePlaceholder":158},[127,936,937,939,941],{"class":129,"line":182},[127,938,244],{"class":140},[127,940,514],{"class":144},[127,942,869],{"class":151},[127,944,945],{"class":129,"line":191},[127,946,208],{"class":151},[21,948],{},[24,950,952],{"id":951},"final-code","Final Code",[11,954,955],{},"Here is the complete code for implementing stack in Go.",[118,957,959],{"className":120,"code":958,"language":122,"meta":123,"style":123},"package stack\n\nimport “sync”\n\n\u002F\u002F Item interface to store any data type in stack\ntype Item interface{}\n\n\u002F\u002F Stack struct which contains a list of Items\ntype Stack struct {\n    items []Item\n    mutex sync.Mutex\n}\n\n\u002F\u002F NewEmptyStack() returns a new instance of Stack with zero elements\nfunc NewEmptyStack() *Stack {\n    return &Stack{\n        items: nil,\n    }\n}\n\n\u002F\u002F NewStack() returns a new instance of Stack with list of specified elements\nfunc NewStack(items []Item) *Stack {\n    return &Stack{\n        items: items,\n    }\n}\n\n\u002F\u002F Push() adds new item to top of existing\u002Fempty stack\nfunc (stack *Stack) Push(item Item) {\n    stack.mutex.Lock()\n    defer stack.mutex.Unlock()\n\n    stack.items = append(stack.items, item)\n}\n\n\u002F\u002F Pop() removes most recent item(top) from stack\nfunc (stack *Stack) Pop() Item {\n    stack.mutex.Lock()\n    defer stack.mutex.Unlock()\n\n    if len(stack.items) == 0 {\n        return nil\n    }\n\n    lastItem := stack.items[len(stack.items)-1]\n    stack.items = stack.items[:len(stack.items)-1]\n\n    return lastItem\n}\n\n\u002F\u002F IsEmpty() returns whether the stack is empty or not (boolean result)\nfunc (stack *Stack) IsEmpty() bool {\n    stack.mutex.Lock()\n    defer stack.mutex.Unlock()\n\n    return len(stack.items) == 0\n}\n\n\u002F\u002F Top() returns the last inserted item in stack without removing it.\nfunc (stack *Stack) Top() Item {\n    stack.mutex.Lock()\n    defer stack.mutex.Unlock()\n\n    if len(stack.items) == 0 {\n        return nil\n    }\n\n    return stack.items[len(stack.items)-1]\n}\n\n\u002F\u002F Size() returns the number of items currently in the stack\nfunc (stack *Stack) Size() int {\n    stack.mutex.Lock()\n    defer stack.mutex.Unlock()\n\n    return len(stack.items)\n}\n\n\u002F\u002F Clear() removes all items from the stack\nfunc (stack *Stack) Clear() {\n    stack.mutex.Lock()\n    defer stack.mutex.Unlock()\n\n    stack.items = nil\n}\n",[94,960,961,969,973,981,985,989,999,1003,1007,1017,1023,1033,1037,1041,1045,1059,1069,1077,1081,1085,1089,1093,1115,1126,1131,1136,1141,1146,1151,1176,1185,1196,1201,1212,1217,1222,1227,1250,1259,1270,1275,1290,1297,1302,1307,1326,1345,1350,1357,1362,1367,1372,1395,1404,1415,1420,1433,1438,1443,1448,1471,1480,1491,1496,1511,1518,1523,1528,1545,1550,1555,1560,1583,1592,1603,1608,1617,1622,1627,1633,1654,1663,1674,1679,1688],{"__ignoreMap":123},[127,962,963,966],{"class":129,"line":130},[127,964,965],{"class":140},"package",[127,967,968],{"class":144}," stack\n",[127,970,971],{"class":129,"line":137},[127,972,159],{"emptyLinePlaceholder":158},[127,974,975,978],{"class":129,"line":155},[127,976,977],{"class":140},"import",[127,979,980],{"class":151}," “sync”\n",[127,982,983],{"class":129,"line":162},[127,984,159],{"emptyLinePlaceholder":158},[127,986,987],{"class":129,"line":168},[127,988,134],{"class":133},[127,990,991,993,995,997],{"class":129,"line":182},[127,992,141],{"class":140},[127,994,145],{"class":144},[127,996,148],{"class":140},[127,998,152],{"class":151},[127,1000,1001],{"class":129,"line":191},[127,1002,159],{"emptyLinePlaceholder":158},[127,1004,1005],{"class":129,"line":205},[127,1006,165],{"class":133},[127,1008,1009,1011,1013,1015],{"class":129,"line":211},[127,1010,141],{"class":140},[127,1012,173],{"class":144},[127,1014,176],{"class":140},[127,1016,179],{"class":151},[127,1018,1019,1021],{"class":129,"line":216},[127,1020,185],{"class":151},[127,1022,188],{"class":144},[127,1024,1025,1027,1029,1031],{"class":129,"line":222},[127,1026,194],{"class":151},[127,1028,197],{"class":144},[127,1030,35],{"class":151},[127,1032,202],{"class":144},[127,1034,1035],{"class":129,"line":241},[127,1036,208],{"class":151},[127,1038,1039],{"class":129,"line":255},[127,1040,159],{"emptyLinePlaceholder":158},[127,1042,1043],{"class":129,"line":268},[127,1044,219],{"class":133},[127,1046,1047,1049,1051,1053,1055,1057],{"class":129,"line":274},[127,1048,225],{"class":140},[127,1050,228],{"class":144},[127,1052,231],{"class":151},[127,1054,234],{"class":140},[127,1056,100],{"class":144},[127,1058,179],{"class":151},[127,1060,1061,1063,1065,1067],{"class":129,"line":279},[127,1062,244],{"class":140},[127,1064,247],{"class":140},[127,1066,100],{"class":144},[127,1068,252],{"class":151},[127,1070,1071,1073,1075],{"class":129,"line":284},[127,1072,258],{"class":151},[127,1074,262],{"class":261},[127,1076,265],{"class":151},[127,1078,1079],{"class":129,"line":290},[127,1080,271],{"class":151},[127,1082,1083],{"class":129,"line":319},[127,1084,208],{"class":151},[127,1086,1087],{"class":129,"line":330},[127,1088,159],{"emptyLinePlaceholder":158},[127,1090,1091],{"class":129,"line":336},[127,1092,287],{"class":133},[127,1094,1095,1097,1099,1101,1103,1105,1107,1109,1111,1113],{"class":129,"line":341},[127,1096,225],{"class":140},[127,1098,295],{"class":144},[127,1100,298],{"class":151},[127,1102,302],{"class":301},[127,1104,305],{"class":151},[127,1106,96],{"class":144},[127,1108,310],{"class":151},[127,1110,234],{"class":140},[127,1112,100],{"class":144},[127,1114,179],{"class":151},[127,1116,1118,1120,1122,1124],{"class":129,"line":1117},23,[127,1119,244],{"class":140},[127,1121,247],{"class":140},[127,1123,100],{"class":144},[127,1125,252],{"class":151},[127,1127,1129],{"class":129,"line":1128},24,[127,1130,333],{"class":151},[127,1132,1134],{"class":129,"line":1133},25,[127,1135,271],{"class":151},[127,1137,1139],{"class":129,"line":1138},26,[127,1140,208],{"class":151},[127,1142,1144],{"class":129,"line":1143},27,[127,1145,159],{"emptyLinePlaceholder":158},[127,1147,1149],{"class":129,"line":1148},28,[127,1150,367],{"class":133},[127,1152,1154,1156,1158,1160,1162,1164,1166,1168,1170,1172,1174],{"class":129,"line":1153},29,[127,1155,225],{"class":140},[127,1157,374],{"class":151},[127,1159,377],{"class":301},[127,1161,234],{"class":140},[127,1163,100],{"class":144},[127,1165,310],{"class":151},[127,1167,45],{"class":144},[127,1169,298],{"class":151},[127,1171,390],{"class":301},[127,1173,145],{"class":144},[127,1175,395],{"class":151},[127,1177,1179,1181,1183],{"class":129,"line":1178},30,[127,1180,400],{"class":151},[127,1182,403],{"class":144},[127,1184,406],{"class":151},[127,1186,1188,1190,1192,1194],{"class":129,"line":1187},31,[127,1189,411],{"class":140},[127,1191,414],{"class":151},[127,1193,417],{"class":144},[127,1195,406],{"class":151},[127,1197,1199],{"class":129,"line":1198},32,[127,1200,159],{"emptyLinePlaceholder":158},[127,1202,1204,1206,1208,1210],{"class":129,"line":1203},33,[127,1205,428],{"class":151},[127,1207,431],{"class":140},[127,1209,434],{"class":144},[127,1211,437],{"class":151},[127,1213,1215],{"class":129,"line":1214},34,[127,1216,208],{"class":151},[127,1218,1220],{"class":129,"line":1219},35,[127,1221,159],{"emptyLinePlaceholder":158},[127,1223,1225],{"class":129,"line":1224},36,[127,1226,462],{"class":133},[127,1228,1230,1232,1234,1236,1238,1240,1242,1244,1246,1248],{"class":129,"line":1229},37,[127,1231,225],{"class":140},[127,1233,374],{"class":151},[127,1235,377],{"class":301},[127,1237,234],{"class":140},[127,1239,100],{"class":144},[127,1241,310],{"class":151},[127,1243,48],{"class":144},[127,1245,231],{"class":151},[127,1247,96],{"class":144},[127,1249,179],{"class":151},[127,1251,1253,1255,1257],{"class":129,"line":1252},38,[127,1254,400],{"class":151},[127,1256,403],{"class":144},[127,1258,406],{"class":151},[127,1260,1262,1264,1266,1268],{"class":129,"line":1261},39,[127,1263,411],{"class":140},[127,1265,414],{"class":151},[127,1267,417],{"class":144},[127,1269,406],{"class":151},[127,1271,1273],{"class":129,"line":1272},40,[127,1274,159],{"emptyLinePlaceholder":158},[127,1276,1278,1280,1282,1284,1286,1288],{"class":129,"line":1277},41,[127,1279,511],{"class":140},[127,1281,514],{"class":144},[127,1283,517],{"class":151},[127,1285,520],{"class":140},[127,1287,523],{"class":261},[127,1289,179],{"class":151},[127,1291,1293,1295],{"class":129,"line":1292},42,[127,1294,530],{"class":140},[127,1296,533],{"class":261},[127,1298,1300],{"class":129,"line":1299},43,[127,1301,271],{"class":151},[127,1303,1305],{"class":129,"line":1304},44,[127,1306,159],{"emptyLinePlaceholder":158},[127,1308,1310,1312,1314,1316,1318,1320,1322,1324],{"class":129,"line":1309},45,[127,1311,546],{"class":151},[127,1313,549],{"class":140},[127,1315,552],{"class":151},[127,1317,555],{"class":144},[127,1319,558],{"class":151},[127,1321,561],{"class":140},[127,1323,564],{"class":261},[127,1325,567],{"class":151},[127,1327,1329,1331,1333,1335,1337,1339,1341,1343],{"class":129,"line":1328},46,[127,1330,428],{"class":151},[127,1332,431],{"class":140},[127,1334,576],{"class":151},[127,1336,555],{"class":144},[127,1338,558],{"class":151},[127,1340,561],{"class":140},[127,1342,564],{"class":261},[127,1344,567],{"class":151},[127,1346,1348],{"class":129,"line":1347},47,[127,1349,159],{"emptyLinePlaceholder":158},[127,1351,1353,1355],{"class":129,"line":1352},48,[127,1354,244],{"class":140},[127,1356,597],{"class":151},[127,1358,1360],{"class":129,"line":1359},49,[127,1361,208],{"class":151},[127,1363,1365],{"class":129,"line":1364},50,[127,1366,159],{"emptyLinePlaceholder":158},[127,1368,1370],{"class":129,"line":1369},51,[127,1371,732],{"class":133},[127,1373,1375,1377,1379,1381,1383,1385,1387,1389,1391,1393],{"class":129,"line":1374},52,[127,1376,225],{"class":140},[127,1378,374],{"class":151},[127,1380,377],{"class":301},[127,1382,234],{"class":140},[127,1384,100],{"class":144},[127,1386,310],{"class":151},[127,1388,749],{"class":144},[127,1390,231],{"class":151},[127,1392,754],{"class":140},[127,1394,179],{"class":151},[127,1396,1398,1400,1402],{"class":129,"line":1397},53,[127,1399,400],{"class":151},[127,1401,403],{"class":144},[127,1403,406],{"class":151},[127,1405,1407,1409,1411,1413],{"class":129,"line":1406},54,[127,1408,411],{"class":140},[127,1410,414],{"class":151},[127,1412,417],{"class":144},[127,1414,406],{"class":151},[127,1416,1418],{"class":129,"line":1417},55,[127,1419,159],{"emptyLinePlaceholder":158},[127,1421,1423,1425,1427,1429,1431],{"class":129,"line":1422},56,[127,1424,244],{"class":140},[127,1426,514],{"class":144},[127,1428,517],{"class":151},[127,1430,520],{"class":140},[127,1432,791],{"class":261},[127,1434,1436],{"class":129,"line":1435},57,[127,1437,208],{"class":151},[127,1439,1441],{"class":129,"line":1440},58,[127,1442,159],{"emptyLinePlaceholder":158},[127,1444,1446],{"class":129,"line":1445},59,[127,1447,620],{"class":133},[127,1449,1451,1453,1455,1457,1459,1461,1463,1465,1467,1469],{"class":129,"line":1450},60,[127,1452,225],{"class":140},[127,1454,374],{"class":151},[127,1456,377],{"class":301},[127,1458,234],{"class":140},[127,1460,100],{"class":144},[127,1462,310],{"class":151},[127,1464,637],{"class":144},[127,1466,231],{"class":151},[127,1468,96],{"class":144},[127,1470,179],{"class":151},[127,1472,1474,1476,1478],{"class":129,"line":1473},61,[127,1475,400],{"class":151},[127,1477,403],{"class":144},[127,1479,406],{"class":151},[127,1481,1483,1485,1487,1489],{"class":129,"line":1482},62,[127,1484,411],{"class":140},[127,1486,414],{"class":151},[127,1488,417],{"class":144},[127,1490,406],{"class":151},[127,1492,1494],{"class":129,"line":1493},63,[127,1495,159],{"emptyLinePlaceholder":158},[127,1497,1499,1501,1503,1505,1507,1509],{"class":129,"line":1498},64,[127,1500,511],{"class":140},[127,1502,514],{"class":144},[127,1504,517],{"class":151},[127,1506,520],{"class":140},[127,1508,523],{"class":261},[127,1510,179],{"class":151},[127,1512,1514,1516],{"class":129,"line":1513},65,[127,1515,530],{"class":140},[127,1517,533],{"class":261},[127,1519,1521],{"class":129,"line":1520},66,[127,1522,271],{"class":151},[127,1524,1526],{"class":129,"line":1525},67,[127,1527,159],{"emptyLinePlaceholder":158},[127,1529,1531,1533,1535,1537,1539,1541,1543],{"class":129,"line":1530},68,[127,1532,244],{"class":140},[127,1534,552],{"class":151},[127,1536,555],{"class":144},[127,1538,558],{"class":151},[127,1540,561],{"class":140},[127,1542,564],{"class":261},[127,1544,567],{"class":151},[127,1546,1548],{"class":129,"line":1547},69,[127,1549,208],{"class":151},[127,1551,1553],{"class":129,"line":1552},70,[127,1554,159],{"emptyLinePlaceholder":158},[127,1556,1558],{"class":129,"line":1557},71,[127,1559,814],{"class":133},[127,1561,1563,1565,1567,1569,1571,1573,1575,1577,1579,1581],{"class":129,"line":1562},72,[127,1564,225],{"class":140},[127,1566,374],{"class":151},[127,1568,377],{"class":301},[127,1570,234],{"class":140},[127,1572,100],{"class":144},[127,1574,310],{"class":151},[127,1576,831],{"class":144},[127,1578,231],{"class":151},[127,1580,836],{"class":140},[127,1582,179],{"class":151},[127,1584,1586,1588,1590],{"class":129,"line":1585},73,[127,1587,400],{"class":151},[127,1589,403],{"class":144},[127,1591,406],{"class":151},[127,1593,1595,1597,1599,1601],{"class":129,"line":1594},74,[127,1596,411],{"class":140},[127,1598,414],{"class":151},[127,1600,417],{"class":144},[127,1602,406],{"class":151},[127,1604,1606],{"class":129,"line":1605},75,[127,1607,159],{"emptyLinePlaceholder":158},[127,1609,1611,1613,1615],{"class":129,"line":1610},76,[127,1612,244],{"class":140},[127,1614,514],{"class":144},[127,1616,869],{"class":151},[127,1618,1620],{"class":129,"line":1619},77,[127,1621,208],{"class":151},[127,1623,1625],{"class":129,"line":1624},78,[127,1626,159],{"emptyLinePlaceholder":158},[127,1628,1630],{"class":129,"line":1629},79,[127,1631,1632],{"class":133},"\u002F\u002F Clear() removes all items from the stack\n",[127,1634,1636,1638,1640,1642,1644,1646,1648,1651],{"class":129,"line":1635},80,[127,1637,225],{"class":140},[127,1639,374],{"class":151},[127,1641,377],{"class":301},[127,1643,234],{"class":140},[127,1645,100],{"class":144},[127,1647,310],{"class":151},[127,1649,1650],{"class":144},"Clear",[127,1652,1653],{"class":151},"() {\n",[127,1655,1657,1659,1661],{"class":129,"line":1656},81,[127,1658,400],{"class":151},[127,1660,403],{"class":144},[127,1662,406],{"class":151},[127,1664,1666,1668,1670,1672],{"class":129,"line":1665},82,[127,1667,411],{"class":140},[127,1669,414],{"class":151},[127,1671,417],{"class":144},[127,1673,406],{"class":151},[127,1675,1677],{"class":129,"line":1676},83,[127,1678,159],{"emptyLinePlaceholder":158},[127,1680,1682,1684,1686],{"class":129,"line":1681},84,[127,1683,428],{"class":151},[127,1685,431],{"class":140},[127,1687,533],{"class":261},[127,1689,1691],{"class":129,"line":1690},85,[127,1692,208],{"class":151},[21,1694],{},[24,1696,1698],{"id":1697},"tests-please","Tests Please !!",[11,1700,1701],{},"Ok ok, how can we end this post without testing the code here. Here is a complete test code for the functions we implemented before. We use",[118,1703,1705],{"className":120,"code":1704,"language":122,"meta":123,"style":123},"package stack\n\nimport (\n    “testing”\n\n    “github.com\u002Fstretchr\u002Ftestify\u002Fassert”\n)\n\nfunc TestPush(t *testing.T) {\n    stack := NewEmptyStack()\n    t.Run(“when item is pushed”, func(t *testing.T) {\n        expectedStack := NewStack([]Item{\n            1,\n            2,\n            3,\n        })\n        t.Run(“stack should be updated”, func(t *testing.T) {\n            stack.Push(1)\n            stack.Push(2)\n            stack.Push(3)\n            assert.Equal(t, stack, expectedStack)\n        })\n    })\n}\n\nfunc TestPop(t *testing.T) {\n    stack := NewEmptyStack()\n    t.Run(“when stack is empty”, func(t *testing.T) {\n        expectedStack := NewEmptyStack()\n        t.Run(“it should return nil response”, func(t *testing.T) {\n            \u002F\u002F Pop 1\n            poppedItem := stack.Pop()\n            assert.Equal(t, poppedItem, nil)\n            assert.Equal(t, stack, expectedStack)\n        })\n    })\n\n    t.Run(“when stack is not empty”, func(t *testing.T) {\n        expectedStack := NewStack([]Item{\n            1,\n        })\n        t.Run(“it should return last inserted item and update the stack”, func(t *testing.T) {\n            \u002F\u002F Push two items\n            stack.Push(1)\n            stack.Push(2)\n\n            \u002F\u002F Pop 1\n            poppedItem := stack.Pop()\n            assert.Equal(t, poppedItem, 2)\n            assert.Equal(t, stack, expectedStack)\n        })\n    })\n}\n\nfunc TestIsEmpty(t *testing.T) {\n    stack := NewEmptyStack()\n    t.Run(“when stack is not empty”, func(t *testing.T) {\n        t.Run(“it should return false”, func(t *testing.T) {\n            \u002F\u002F Push one item\n            stack.Push(1)\n            assert.Equal(t, stack.IsEmpty(), false)\n            \u002F\u002F Pop one item\n            stack.Pop()\n            assert.Equal(t, stack.IsEmpty(), true)\n        })\n    })\n\n    t.Run(“when stack is empty”, func(t *testing.T) {\n        t.Run(“it should return true”, func(t *testing.T) {\n            \u002F\u002F Pop one item\n            stack.Pop()\n            assert.Equal(t, stack.IsEmpty(), true)\n        })\n    })\n}\n\nfunc TestTop(t *testing.T) {\n    t.Run(“when stack is not empty”, func(t *testing.T) {\n        stack := NewEmptyStack()\n        expectedStack := NewStack([]Item{\n            1,\n            2,\n        })\n        t.Run(“it should return last inserted item and no change in stack”, func(t *testing.T) {\n            \u002F\u002F Push two items\n            stack.Push(1)\n            stack.Push(2)\n\n            item := stack.Top()\n            assert.Equal(t, item, 2)\n            assert.Equal(t, stack, expectedStack)\n        })\n    })\n\n    t.Run(“when stack is empty”, func(t *testing.T) {\n        stack := NewEmptyStack()\n        t.Run(“it should return nil”, func(t *testing.T) {\n            item := stack.Top()\n            assert.Equal(t, item, nil)\n        })\n    })\n}\n\nfunc TestSize(t *testing.T) {\n    stack := NewEmptyStack()\n    t.Run(“when stack is provided”, func(t *testing.T) {\n        t.Run(“it should return number of items in stack”, func(t *testing.T) {\n            \u002F\u002F Push one item\n            stack.Push(1)\n            assert.Equal(t, stack.Size(), 1)\n            \u002F\u002F Pop one item\n            stack.Pop()\n            assert.Equal(t, stack.Size(), 0)\n        })\n    })\n}\n\nfunc TestClear(t *testing.T) {\n    stack := NewEmptyStack()\n    t.Run(“when stack is provided”, func(t *testing.T) {\n        expectedStack := NewEmptyStack()\n        t.Run(“it should clear all items in stack”, func(t *testing.T) {\n            \u002F\u002F Push one item\n            stack.Push(1)\n            stack.Push(2)\n            stack.Clear()\n            assert.Equal(t, stack, expectedStack)\n        })\n    })\n}\n",[94,1706,1707,1713,1717,1724,1729,1733,1754,1759,1763,1788,1799,1826,1842,1849,1856,1863,1868,1894,1907,1920,1933,1944,1948,1953,1957,1961,1982,1992,2017,2027,2061,2066,2080,2093,2101,2105,2109,2113,2138,2152,2158,2162,2191,2196,2208,2220,2224,2228,2240,2252,2260,2264,2268,2272,2276,2297,2307,2331,2363,2368,2380,2399,2404,2412,2429,2433,2437,2441,2465,2496,2500,2508,2524,2528,2532,2536,2540,2561,2585,2596,2610,2616,2622,2626,2655,2659,2672,2685,2690,2704,2718,2727,2732,2737,2742,2767,2778,2809,2822,2835,2840,2845,2850,2855,2877,2888,2914,2944,2949,2962,2979,2984,2993,3011,3016,3021,3026,3031,3053,3064,3089,3100,3126,3131,3144,3157,3166,3175,3180,3185],{"__ignoreMap":123},[127,1708,1709,1711],{"class":129,"line":130},[127,1710,965],{"class":140},[127,1712,968],{"class":144},[127,1714,1715],{"class":129,"line":137},[127,1716,159],{"emptyLinePlaceholder":158},[127,1718,1719,1721],{"class":129,"line":155},[127,1720,977],{"class":140},[127,1722,1723],{"class":151}," (\n",[127,1725,1726],{"class":129,"line":162},[127,1727,1728],{"class":151},"    “testing”\n",[127,1730,1731],{"class":129,"line":168},[127,1732,159],{"emptyLinePlaceholder":158},[127,1734,1735,1738,1741,1744,1746,1749,1751],{"class":129,"line":182},[127,1736,1737],{"class":151},"    “github.com",[127,1739,1740],{"class":140},"\u002F",[127,1742,1743],{"class":151},"stretchr",[127,1745,1740],{"class":140},[127,1747,1748],{"class":151},"testify",[127,1750,1740],{"class":140},[127,1752,1753],{"class":151},"assert”\n",[127,1755,1756],{"class":129,"line":191},[127,1757,1758],{"class":151},")\n",[127,1760,1761],{"class":129,"line":205},[127,1762,159],{"emptyLinePlaceholder":158},[127,1764,1765,1767,1770,1772,1775,1778,1781,1783,1786],{"class":129,"line":211},[127,1766,225],{"class":140},[127,1768,1769],{"class":144}," TestPush",[127,1771,298],{"class":151},[127,1773,1774],{"class":301},"t",[127,1776,1777],{"class":140}," *",[127,1779,1780],{"class":144},"testing",[127,1782,35],{"class":151},[127,1784,1785],{"class":144},"T",[127,1787,395],{"class":151},[127,1789,1790,1793,1795,1797],{"class":129,"line":216},[127,1791,1792],{"class":151},"    stack ",[127,1794,549],{"class":140},[127,1796,228],{"class":144},[127,1798,406],{"class":151},[127,1800,1801,1804,1807,1810,1812,1814,1816,1818,1820,1822,1824],{"class":129,"line":222},[127,1802,1803],{"class":151},"    t.",[127,1805,1806],{"class":144},"Run",[127,1808,1809],{"class":151},"(“when item is pushed”, ",[127,1811,225],{"class":140},[127,1813,298],{"class":151},[127,1815,1774],{"class":301},[127,1817,1777],{"class":140},[127,1819,1780],{"class":144},[127,1821,35],{"class":151},[127,1823,1785],{"class":144},[127,1825,395],{"class":151},[127,1827,1828,1831,1833,1835,1838,1840],{"class":129,"line":241},[127,1829,1830],{"class":151},"        expectedStack ",[127,1832,549],{"class":140},[127,1834,295],{"class":144},[127,1836,1837],{"class":151},"([]",[127,1839,96],{"class":144},[127,1841,252],{"class":151},[127,1843,1844,1847],{"class":129,"line":255},[127,1845,1846],{"class":261},"            1",[127,1848,265],{"class":151},[127,1850,1851,1854],{"class":129,"line":268},[127,1852,1853],{"class":261},"            2",[127,1855,265],{"class":151},[127,1857,1858,1861],{"class":129,"line":274},[127,1859,1860],{"class":261},"            3",[127,1862,265],{"class":151},[127,1864,1865],{"class":129,"line":279},[127,1866,1867],{"class":151},"        })\n",[127,1869,1870,1873,1875,1878,1880,1882,1884,1886,1888,1890,1892],{"class":129,"line":284},[127,1871,1872],{"class":151},"        t.",[127,1874,1806],{"class":144},[127,1876,1877],{"class":151},"(“stack should be updated”, ",[127,1879,225],{"class":140},[127,1881,298],{"class":151},[127,1883,1774],{"class":301},[127,1885,1777],{"class":140},[127,1887,1780],{"class":144},[127,1889,35],{"class":151},[127,1891,1785],{"class":144},[127,1893,395],{"class":151},[127,1895,1896,1899,1901,1903,1905],{"class":129,"line":290},[127,1897,1898],{"class":151},"            stack.",[127,1900,45],{"class":144},[127,1902,298],{"class":151},[127,1904,564],{"class":261},[127,1906,1758],{"class":151},[127,1908,1909,1911,1913,1915,1918],{"class":129,"line":319},[127,1910,1898],{"class":151},[127,1912,45],{"class":144},[127,1914,298],{"class":151},[127,1916,1917],{"class":261},"2",[127,1919,1758],{"class":151},[127,1921,1922,1924,1926,1928,1931],{"class":129,"line":330},[127,1923,1898],{"class":151},[127,1925,45],{"class":144},[127,1927,298],{"class":151},[127,1929,1930],{"class":261},"3",[127,1932,1758],{"class":151},[127,1934,1935,1938,1941],{"class":129,"line":336},[127,1936,1937],{"class":151},"            assert.",[127,1939,1940],{"class":144},"Equal",[127,1942,1943],{"class":151},"(t, stack, expectedStack)\n",[127,1945,1946],{"class":129,"line":341},[127,1947,1867],{"class":151},[127,1949,1950],{"class":129,"line":1117},[127,1951,1952],{"class":151},"    })\n",[127,1954,1955],{"class":129,"line":1128},[127,1956,208],{"class":151},[127,1958,1959],{"class":129,"line":1133},[127,1960,159],{"emptyLinePlaceholder":158},[127,1962,1963,1965,1968,1970,1972,1974,1976,1978,1980],{"class":129,"line":1138},[127,1964,225],{"class":140},[127,1966,1967],{"class":144}," TestPop",[127,1969,298],{"class":151},[127,1971,1774],{"class":301},[127,1973,1777],{"class":140},[127,1975,1780],{"class":144},[127,1977,35],{"class":151},[127,1979,1785],{"class":144},[127,1981,395],{"class":151},[127,1983,1984,1986,1988,1990],{"class":129,"line":1143},[127,1985,1792],{"class":151},[127,1987,549],{"class":140},[127,1989,228],{"class":144},[127,1991,406],{"class":151},[127,1993,1994,1996,1998,2001,2003,2005,2007,2009,2011,2013,2015],{"class":129,"line":1148},[127,1995,1803],{"class":151},[127,1997,1806],{"class":144},[127,1999,2000],{"class":151},"(“when stack is empty”, ",[127,2002,225],{"class":140},[127,2004,298],{"class":151},[127,2006,1774],{"class":301},[127,2008,1777],{"class":140},[127,2010,1780],{"class":144},[127,2012,35],{"class":151},[127,2014,1785],{"class":144},[127,2016,395],{"class":151},[127,2018,2019,2021,2023,2025],{"class":129,"line":1153},[127,2020,1830],{"class":151},[127,2022,549],{"class":140},[127,2024,228],{"class":144},[127,2026,406],{"class":151},[127,2028,2029,2031,2033,2036,2039,2042,2045,2047,2049,2051,2053,2055,2057,2059],{"class":129,"line":1178},[127,2030,1872],{"class":151},[127,2032,1806],{"class":144},[127,2034,2035],{"class":151},"(“it should ",[127,2037,2038],{"class":140},"return",[127,2040,2041],{"class":261}," nil",[127,2043,2044],{"class":151}," response”, ",[127,2046,225],{"class":140},[127,2048,298],{"class":151},[127,2050,1774],{"class":301},[127,2052,1777],{"class":140},[127,2054,1780],{"class":144},[127,2056,35],{"class":151},[127,2058,1785],{"class":144},[127,2060,395],{"class":151},[127,2062,2063],{"class":129,"line":1187},[127,2064,2065],{"class":133},"            \u002F\u002F Pop 1\n",[127,2067,2068,2071,2073,2076,2078],{"class":129,"line":1198},[127,2069,2070],{"class":151},"            poppedItem ",[127,2072,549],{"class":140},[127,2074,2075],{"class":151}," stack.",[127,2077,48],{"class":144},[127,2079,406],{"class":151},[127,2081,2082,2084,2086,2089,2091],{"class":129,"line":1203},[127,2083,1937],{"class":151},[127,2085,1940],{"class":144},[127,2087,2088],{"class":151},"(t, poppedItem, ",[127,2090,262],{"class":261},[127,2092,1758],{"class":151},[127,2094,2095,2097,2099],{"class":129,"line":1214},[127,2096,1937],{"class":151},[127,2098,1940],{"class":144},[127,2100,1943],{"class":151},[127,2102,2103],{"class":129,"line":1219},[127,2104,1867],{"class":151},[127,2106,2107],{"class":129,"line":1224},[127,2108,1952],{"class":151},[127,2110,2111],{"class":129,"line":1229},[127,2112,159],{"emptyLinePlaceholder":158},[127,2114,2115,2117,2119,2122,2124,2126,2128,2130,2132,2134,2136],{"class":129,"line":1252},[127,2116,1803],{"class":151},[127,2118,1806],{"class":144},[127,2120,2121],{"class":151},"(“when stack is not empty”, ",[127,2123,225],{"class":140},[127,2125,298],{"class":151},[127,2127,1774],{"class":301},[127,2129,1777],{"class":140},[127,2131,1780],{"class":144},[127,2133,35],{"class":151},[127,2135,1785],{"class":144},[127,2137,395],{"class":151},[127,2139,2140,2142,2144,2146,2148,2150],{"class":129,"line":1261},[127,2141,1830],{"class":151},[127,2143,549],{"class":140},[127,2145,295],{"class":144},[127,2147,1837],{"class":151},[127,2149,96],{"class":144},[127,2151,252],{"class":151},[127,2153,2154,2156],{"class":129,"line":1272},[127,2155,1846],{"class":261},[127,2157,265],{"class":151},[127,2159,2160],{"class":129,"line":1277},[127,2161,1867],{"class":151},[127,2163,2164,2166,2168,2170,2172,2175,2177,2179,2181,2183,2185,2187,2189],{"class":129,"line":1292},[127,2165,1872],{"class":151},[127,2167,1806],{"class":144},[127,2169,2035],{"class":151},[127,2171,2038],{"class":140},[127,2173,2174],{"class":151}," last inserted item and update the stack”, ",[127,2176,225],{"class":140},[127,2178,298],{"class":151},[127,2180,1774],{"class":301},[127,2182,1777],{"class":140},[127,2184,1780],{"class":144},[127,2186,35],{"class":151},[127,2188,1785],{"class":144},[127,2190,395],{"class":151},[127,2192,2193],{"class":129,"line":1299},[127,2194,2195],{"class":133},"            \u002F\u002F Push two items\n",[127,2197,2198,2200,2202,2204,2206],{"class":129,"line":1304},[127,2199,1898],{"class":151},[127,2201,45],{"class":144},[127,2203,298],{"class":151},[127,2205,564],{"class":261},[127,2207,1758],{"class":151},[127,2209,2210,2212,2214,2216,2218],{"class":129,"line":1309},[127,2211,1898],{"class":151},[127,2213,45],{"class":144},[127,2215,298],{"class":151},[127,2217,1917],{"class":261},[127,2219,1758],{"class":151},[127,2221,2222],{"class":129,"line":1328},[127,2223,159],{"emptyLinePlaceholder":158},[127,2225,2226],{"class":129,"line":1347},[127,2227,2065],{"class":133},[127,2229,2230,2232,2234,2236,2238],{"class":129,"line":1352},[127,2231,2070],{"class":151},[127,2233,549],{"class":140},[127,2235,2075],{"class":151},[127,2237,48],{"class":144},[127,2239,406],{"class":151},[127,2241,2242,2244,2246,2248,2250],{"class":129,"line":1359},[127,2243,1937],{"class":151},[127,2245,1940],{"class":144},[127,2247,2088],{"class":151},[127,2249,1917],{"class":261},[127,2251,1758],{"class":151},[127,2253,2254,2256,2258],{"class":129,"line":1364},[127,2255,1937],{"class":151},[127,2257,1940],{"class":144},[127,2259,1943],{"class":151},[127,2261,2262],{"class":129,"line":1369},[127,2263,1867],{"class":151},[127,2265,2266],{"class":129,"line":1374},[127,2267,1952],{"class":151},[127,2269,2270],{"class":129,"line":1397},[127,2271,208],{"class":151},[127,2273,2274],{"class":129,"line":1406},[127,2275,159],{"emptyLinePlaceholder":158},[127,2277,2278,2280,2283,2285,2287,2289,2291,2293,2295],{"class":129,"line":1417},[127,2279,225],{"class":140},[127,2281,2282],{"class":144}," TestIsEmpty",[127,2284,298],{"class":151},[127,2286,1774],{"class":301},[127,2288,1777],{"class":140},[127,2290,1780],{"class":144},[127,2292,35],{"class":151},[127,2294,1785],{"class":144},[127,2296,395],{"class":151},[127,2298,2299,2301,2303,2305],{"class":129,"line":1422},[127,2300,1792],{"class":151},[127,2302,549],{"class":140},[127,2304,228],{"class":144},[127,2306,406],{"class":151},[127,2308,2309,2311,2313,2315,2317,2319,2321,2323,2325,2327,2329],{"class":129,"line":1435},[127,2310,1803],{"class":151},[127,2312,1806],{"class":144},[127,2314,2121],{"class":151},[127,2316,225],{"class":140},[127,2318,298],{"class":151},[127,2320,1774],{"class":301},[127,2322,1777],{"class":140},[127,2324,1780],{"class":144},[127,2326,35],{"class":151},[127,2328,1785],{"class":144},[127,2330,395],{"class":151},[127,2332,2333,2335,2337,2339,2341,2344,2347,2349,2351,2353,2355,2357,2359,2361],{"class":129,"line":1440},[127,2334,1872],{"class":151},[127,2336,1806],{"class":144},[127,2338,2035],{"class":151},[127,2340,2038],{"class":140},[127,2342,2343],{"class":261}," false",[127,2345,2346],{"class":151},"”, ",[127,2348,225],{"class":140},[127,2350,298],{"class":151},[127,2352,1774],{"class":301},[127,2354,1777],{"class":140},[127,2356,1780],{"class":144},[127,2358,35],{"class":151},[127,2360,1785],{"class":144},[127,2362,395],{"class":151},[127,2364,2365],{"class":129,"line":1445},[127,2366,2367],{"class":133},"            \u002F\u002F Push one item\n",[127,2369,2370,2372,2374,2376,2378],{"class":129,"line":1450},[127,2371,1898],{"class":151},[127,2373,45],{"class":144},[127,2375,298],{"class":151},[127,2377,564],{"class":261},[127,2379,1758],{"class":151},[127,2381,2382,2384,2386,2389,2391,2394,2397],{"class":129,"line":1473},[127,2383,1937],{"class":151},[127,2385,1940],{"class":144},[127,2387,2388],{"class":151},"(t, stack.",[127,2390,749],{"class":144},[127,2392,2393],{"class":151},"(), ",[127,2395,2396],{"class":261},"false",[127,2398,1758],{"class":151},[127,2400,2401],{"class":129,"line":1482},[127,2402,2403],{"class":133},"            \u002F\u002F Pop one item\n",[127,2405,2406,2408,2410],{"class":129,"line":1493},[127,2407,1898],{"class":151},[127,2409,48],{"class":144},[127,2411,406],{"class":151},[127,2413,2414,2416,2418,2420,2422,2424,2427],{"class":129,"line":1498},[127,2415,1937],{"class":151},[127,2417,1940],{"class":144},[127,2419,2388],{"class":151},[127,2421,749],{"class":144},[127,2423,2393],{"class":151},[127,2425,2426],{"class":261},"true",[127,2428,1758],{"class":151},[127,2430,2431],{"class":129,"line":1513},[127,2432,1867],{"class":151},[127,2434,2435],{"class":129,"line":1520},[127,2436,1952],{"class":151},[127,2438,2439],{"class":129,"line":1525},[127,2440,159],{"emptyLinePlaceholder":158},[127,2442,2443,2445,2447,2449,2451,2453,2455,2457,2459,2461,2463],{"class":129,"line":1530},[127,2444,1803],{"class":151},[127,2446,1806],{"class":144},[127,2448,2000],{"class":151},[127,2450,225],{"class":140},[127,2452,298],{"class":151},[127,2454,1774],{"class":301},[127,2456,1777],{"class":140},[127,2458,1780],{"class":144},[127,2460,35],{"class":151},[127,2462,1785],{"class":144},[127,2464,395],{"class":151},[127,2466,2467,2469,2471,2473,2475,2478,2480,2482,2484,2486,2488,2490,2492,2494],{"class":129,"line":1547},[127,2468,1872],{"class":151},[127,2470,1806],{"class":144},[127,2472,2035],{"class":151},[127,2474,2038],{"class":140},[127,2476,2477],{"class":261}," true",[127,2479,2346],{"class":151},[127,2481,225],{"class":140},[127,2483,298],{"class":151},[127,2485,1774],{"class":301},[127,2487,1777],{"class":140},[127,2489,1780],{"class":144},[127,2491,35],{"class":151},[127,2493,1785],{"class":144},[127,2495,395],{"class":151},[127,2497,2498],{"class":129,"line":1552},[127,2499,2403],{"class":133},[127,2501,2502,2504,2506],{"class":129,"line":1557},[127,2503,1898],{"class":151},[127,2505,48],{"class":144},[127,2507,406],{"class":151},[127,2509,2510,2512,2514,2516,2518,2520,2522],{"class":129,"line":1562},[127,2511,1937],{"class":151},[127,2513,1940],{"class":144},[127,2515,2388],{"class":151},[127,2517,749],{"class":144},[127,2519,2393],{"class":151},[127,2521,2426],{"class":261},[127,2523,1758],{"class":151},[127,2525,2526],{"class":129,"line":1585},[127,2527,1867],{"class":151},[127,2529,2530],{"class":129,"line":1594},[127,2531,1952],{"class":151},[127,2533,2534],{"class":129,"line":1605},[127,2535,208],{"class":151},[127,2537,2538],{"class":129,"line":1610},[127,2539,159],{"emptyLinePlaceholder":158},[127,2541,2542,2544,2547,2549,2551,2553,2555,2557,2559],{"class":129,"line":1619},[127,2543,225],{"class":140},[127,2545,2546],{"class":144}," TestTop",[127,2548,298],{"class":151},[127,2550,1774],{"class":301},[127,2552,1777],{"class":140},[127,2554,1780],{"class":144},[127,2556,35],{"class":151},[127,2558,1785],{"class":144},[127,2560,395],{"class":151},[127,2562,2563,2565,2567,2569,2571,2573,2575,2577,2579,2581,2583],{"class":129,"line":1624},[127,2564,1803],{"class":151},[127,2566,1806],{"class":144},[127,2568,2121],{"class":151},[127,2570,225],{"class":140},[127,2572,298],{"class":151},[127,2574,1774],{"class":301},[127,2576,1777],{"class":140},[127,2578,1780],{"class":144},[127,2580,35],{"class":151},[127,2582,1785],{"class":144},[127,2584,395],{"class":151},[127,2586,2587,2590,2592,2594],{"class":129,"line":1629},[127,2588,2589],{"class":151},"        stack ",[127,2591,549],{"class":140},[127,2593,228],{"class":144},[127,2595,406],{"class":151},[127,2597,2598,2600,2602,2604,2606,2608],{"class":129,"line":1635},[127,2599,1830],{"class":151},[127,2601,549],{"class":140},[127,2603,295],{"class":144},[127,2605,1837],{"class":151},[127,2607,96],{"class":144},[127,2609,252],{"class":151},[127,2611,2612,2614],{"class":129,"line":1656},[127,2613,1846],{"class":261},[127,2615,265],{"class":151},[127,2617,2618,2620],{"class":129,"line":1665},[127,2619,1853],{"class":261},[127,2621,265],{"class":151},[127,2623,2624],{"class":129,"line":1676},[127,2625,1867],{"class":151},[127,2627,2628,2630,2632,2634,2636,2639,2641,2643,2645,2647,2649,2651,2653],{"class":129,"line":1681},[127,2629,1872],{"class":151},[127,2631,1806],{"class":144},[127,2633,2035],{"class":151},[127,2635,2038],{"class":140},[127,2637,2638],{"class":151}," last inserted item and no change in stack”, ",[127,2640,225],{"class":140},[127,2642,298],{"class":151},[127,2644,1774],{"class":301},[127,2646,1777],{"class":140},[127,2648,1780],{"class":144},[127,2650,35],{"class":151},[127,2652,1785],{"class":144},[127,2654,395],{"class":151},[127,2656,2657],{"class":129,"line":1690},[127,2658,2195],{"class":133},[127,2660,2662,2664,2666,2668,2670],{"class":129,"line":2661},86,[127,2663,1898],{"class":151},[127,2665,45],{"class":144},[127,2667,298],{"class":151},[127,2669,564],{"class":261},[127,2671,1758],{"class":151},[127,2673,2675,2677,2679,2681,2683],{"class":129,"line":2674},87,[127,2676,1898],{"class":151},[127,2678,45],{"class":144},[127,2680,298],{"class":151},[127,2682,1917],{"class":261},[127,2684,1758],{"class":151},[127,2686,2688],{"class":129,"line":2687},88,[127,2689,159],{"emptyLinePlaceholder":158},[127,2691,2693,2696,2698,2700,2702],{"class":129,"line":2692},89,[127,2694,2695],{"class":151},"            item ",[127,2697,549],{"class":140},[127,2699,2075],{"class":151},[127,2701,637],{"class":144},[127,2703,406],{"class":151},[127,2705,2707,2709,2711,2714,2716],{"class":129,"line":2706},90,[127,2708,1937],{"class":151},[127,2710,1940],{"class":144},[127,2712,2713],{"class":151},"(t, item, ",[127,2715,1917],{"class":261},[127,2717,1758],{"class":151},[127,2719,2721,2723,2725],{"class":129,"line":2720},91,[127,2722,1937],{"class":151},[127,2724,1940],{"class":144},[127,2726,1943],{"class":151},[127,2728,2730],{"class":129,"line":2729},92,[127,2731,1867],{"class":151},[127,2733,2735],{"class":129,"line":2734},93,[127,2736,1952],{"class":151},[127,2738,2740],{"class":129,"line":2739},94,[127,2741,159],{"emptyLinePlaceholder":158},[127,2743,2745,2747,2749,2751,2753,2755,2757,2759,2761,2763,2765],{"class":129,"line":2744},95,[127,2746,1803],{"class":151},[127,2748,1806],{"class":144},[127,2750,2000],{"class":151},[127,2752,225],{"class":140},[127,2754,298],{"class":151},[127,2756,1774],{"class":301},[127,2758,1777],{"class":140},[127,2760,1780],{"class":144},[127,2762,35],{"class":151},[127,2764,1785],{"class":144},[127,2766,395],{"class":151},[127,2768,2770,2772,2774,2776],{"class":129,"line":2769},96,[127,2771,2589],{"class":151},[127,2773,549],{"class":140},[127,2775,228],{"class":144},[127,2777,406],{"class":151},[127,2779,2781,2783,2785,2787,2789,2791,2793,2795,2797,2799,2801,2803,2805,2807],{"class":129,"line":2780},97,[127,2782,1872],{"class":151},[127,2784,1806],{"class":144},[127,2786,2035],{"class":151},[127,2788,2038],{"class":140},[127,2790,2041],{"class":261},[127,2792,2346],{"class":151},[127,2794,225],{"class":140},[127,2796,298],{"class":151},[127,2798,1774],{"class":301},[127,2800,1777],{"class":140},[127,2802,1780],{"class":144},[127,2804,35],{"class":151},[127,2806,1785],{"class":144},[127,2808,395],{"class":151},[127,2810,2812,2814,2816,2818,2820],{"class":129,"line":2811},98,[127,2813,2695],{"class":151},[127,2815,549],{"class":140},[127,2817,2075],{"class":151},[127,2819,637],{"class":144},[127,2821,406],{"class":151},[127,2823,2825,2827,2829,2831,2833],{"class":129,"line":2824},99,[127,2826,1937],{"class":151},[127,2828,1940],{"class":144},[127,2830,2713],{"class":151},[127,2832,262],{"class":261},[127,2834,1758],{"class":151},[127,2836,2838],{"class":129,"line":2837},100,[127,2839,1867],{"class":151},[127,2841,2843],{"class":129,"line":2842},101,[127,2844,1952],{"class":151},[127,2846,2848],{"class":129,"line":2847},102,[127,2849,208],{"class":151},[127,2851,2853],{"class":129,"line":2852},103,[127,2854,159],{"emptyLinePlaceholder":158},[127,2856,2858,2860,2863,2865,2867,2869,2871,2873,2875],{"class":129,"line":2857},104,[127,2859,225],{"class":140},[127,2861,2862],{"class":144}," TestSize",[127,2864,298],{"class":151},[127,2866,1774],{"class":301},[127,2868,1777],{"class":140},[127,2870,1780],{"class":144},[127,2872,35],{"class":151},[127,2874,1785],{"class":144},[127,2876,395],{"class":151},[127,2878,2880,2882,2884,2886],{"class":129,"line":2879},105,[127,2881,1792],{"class":151},[127,2883,549],{"class":140},[127,2885,228],{"class":144},[127,2887,406],{"class":151},[127,2889,2891,2893,2895,2898,2900,2902,2904,2906,2908,2910,2912],{"class":129,"line":2890},106,[127,2892,1803],{"class":151},[127,2894,1806],{"class":144},[127,2896,2897],{"class":151},"(“when stack is provided”, ",[127,2899,225],{"class":140},[127,2901,298],{"class":151},[127,2903,1774],{"class":301},[127,2905,1777],{"class":140},[127,2907,1780],{"class":144},[127,2909,35],{"class":151},[127,2911,1785],{"class":144},[127,2913,395],{"class":151},[127,2915,2917,2919,2921,2923,2925,2928,2930,2932,2934,2936,2938,2940,2942],{"class":129,"line":2916},107,[127,2918,1872],{"class":151},[127,2920,1806],{"class":144},[127,2922,2035],{"class":151},[127,2924,2038],{"class":140},[127,2926,2927],{"class":151}," number of items in stack”, ",[127,2929,225],{"class":140},[127,2931,298],{"class":151},[127,2933,1774],{"class":301},[127,2935,1777],{"class":140},[127,2937,1780],{"class":144},[127,2939,35],{"class":151},[127,2941,1785],{"class":144},[127,2943,395],{"class":151},[127,2945,2947],{"class":129,"line":2946},108,[127,2948,2367],{"class":133},[127,2950,2952,2954,2956,2958,2960],{"class":129,"line":2951},109,[127,2953,1898],{"class":151},[127,2955,45],{"class":144},[127,2957,298],{"class":151},[127,2959,564],{"class":261},[127,2961,1758],{"class":151},[127,2963,2965,2967,2969,2971,2973,2975,2977],{"class":129,"line":2964},110,[127,2966,1937],{"class":151},[127,2968,1940],{"class":144},[127,2970,2388],{"class":151},[127,2972,831],{"class":144},[127,2974,2393],{"class":151},[127,2976,564],{"class":261},[127,2978,1758],{"class":151},[127,2980,2982],{"class":129,"line":2981},111,[127,2983,2403],{"class":133},[127,2985,2987,2989,2991],{"class":129,"line":2986},112,[127,2988,1898],{"class":151},[127,2990,48],{"class":144},[127,2992,406],{"class":151},[127,2994,2996,2998,3000,3002,3004,3006,3009],{"class":129,"line":2995},113,[127,2997,1937],{"class":151},[127,2999,1940],{"class":144},[127,3001,2388],{"class":151},[127,3003,831],{"class":144},[127,3005,2393],{"class":151},[127,3007,3008],{"class":261},"0",[127,3010,1758],{"class":151},[127,3012,3014],{"class":129,"line":3013},114,[127,3015,1867],{"class":151},[127,3017,3019],{"class":129,"line":3018},115,[127,3020,1952],{"class":151},[127,3022,3024],{"class":129,"line":3023},116,[127,3025,208],{"class":151},[127,3027,3029],{"class":129,"line":3028},117,[127,3030,159],{"emptyLinePlaceholder":158},[127,3032,3034,3036,3039,3041,3043,3045,3047,3049,3051],{"class":129,"line":3033},118,[127,3035,225],{"class":140},[127,3037,3038],{"class":144}," TestClear",[127,3040,298],{"class":151},[127,3042,1774],{"class":301},[127,3044,1777],{"class":140},[127,3046,1780],{"class":144},[127,3048,35],{"class":151},[127,3050,1785],{"class":144},[127,3052,395],{"class":151},[127,3054,3056,3058,3060,3062],{"class":129,"line":3055},119,[127,3057,1792],{"class":151},[127,3059,549],{"class":140},[127,3061,228],{"class":144},[127,3063,406],{"class":151},[127,3065,3067,3069,3071,3073,3075,3077,3079,3081,3083,3085,3087],{"class":129,"line":3066},120,[127,3068,1803],{"class":151},[127,3070,1806],{"class":144},[127,3072,2897],{"class":151},[127,3074,225],{"class":140},[127,3076,298],{"class":151},[127,3078,1774],{"class":301},[127,3080,1777],{"class":140},[127,3082,1780],{"class":144},[127,3084,35],{"class":151},[127,3086,1785],{"class":144},[127,3088,395],{"class":151},[127,3090,3092,3094,3096,3098],{"class":129,"line":3091},121,[127,3093,1830],{"class":151},[127,3095,549],{"class":140},[127,3097,228],{"class":144},[127,3099,406],{"class":151},[127,3101,3103,3105,3107,3110,3112,3114,3116,3118,3120,3122,3124],{"class":129,"line":3102},122,[127,3104,1872],{"class":151},[127,3106,1806],{"class":144},[127,3108,3109],{"class":151},"(“it should clear all items in stack”, ",[127,3111,225],{"class":140},[127,3113,298],{"class":151},[127,3115,1774],{"class":301},[127,3117,1777],{"class":140},[127,3119,1780],{"class":144},[127,3121,35],{"class":151},[127,3123,1785],{"class":144},[127,3125,395],{"class":151},[127,3127,3129],{"class":129,"line":3128},123,[127,3130,2367],{"class":133},[127,3132,3134,3136,3138,3140,3142],{"class":129,"line":3133},124,[127,3135,1898],{"class":151},[127,3137,45],{"class":144},[127,3139,298],{"class":151},[127,3141,564],{"class":261},[127,3143,1758],{"class":151},[127,3145,3147,3149,3151,3153,3155],{"class":129,"line":3146},125,[127,3148,1898],{"class":151},[127,3150,45],{"class":144},[127,3152,298],{"class":151},[127,3154,1917],{"class":261},[127,3156,1758],{"class":151},[127,3158,3160,3162,3164],{"class":129,"line":3159},126,[127,3161,1898],{"class":151},[127,3163,1650],{"class":144},[127,3165,406],{"class":151},[127,3167,3169,3171,3173],{"class":129,"line":3168},127,[127,3170,1937],{"class":151},[127,3172,1940],{"class":144},[127,3174,1943],{"class":151},[127,3176,3178],{"class":129,"line":3177},128,[127,3179,1867],{"class":151},[127,3181,3183],{"class":129,"line":3182},129,[127,3184,1952],{"class":151},[127,3186,3188],{"class":129,"line":3187},130,[127,3189,208],{"class":151},[18,3191,3192,3195,3217,3226,3228,3231,3240],{},[11,3193,3194],{},"Awesome! You just learned how to implement stack in Go. Time to implement it on your own. Try some basic stack problem, for a start try this -",[40,3196,3197,3208],{},[43,3198,3199,3205],{},[3200,3201],"a",{"href":3202,"rel":3203},"https:\u002F\u002Fwww.geeksforgeeks.org\u002Fnext-greater-element\u002F",[3204],"nofollow",[3200,3206,3202],{"href":3202,"rel":3207},[3204],[43,3209,3210,3214],{},[3200,3211],{"href":3212,"rel":3213},"https:\u002F\u002Fwww.geeksforgeeks.org\u002Fprefix-infix-conversion\u002F",[3204],[3200,3215,3212],{"href":3212,"rel":3216},[3204],[11,3218,3219,3220,3225],{},"Liked the article? Consider ",[3200,3221,3224],{"href":3222,"rel":3223},"https:\u002F\u002Fwww.buymeacoffee.com\u002FchHAzigTb",[3204],"supporting me"," ☕️",[21,3227],{},[11,3229,3230],{},"I hope you learned something new. Feel free to suggest improvements ✔️",[11,3232,3233,3234,3239],{},"I share regular updates and resources on ",[3200,3235,3238],{"href":3236,"rel":3237},"https:\u002F\u002Ftwitter.com\u002Fmkfeuhrer",[3204],"Twitter",". Let's connect!",[11,3241,3242],{},[32,3243,3244],{},"Keep exploring 🔎 Keep learning 🚀",[3246,3247,3248],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":123,"searchDepth":137,"depth":137,"links":3250},[3251,3252,3260,3261],{"id":26,"depth":137,"text":27},{"id":82,"depth":137,"text":83,"children":3253},[3254,3255,3256,3257,3258,3259],{"id":350,"depth":155,"text":351},{"id":446,"depth":155,"text":447},{"id":606,"depth":155,"text":607},{"id":718,"depth":155,"text":719},{"id":800,"depth":155,"text":801},{"id":878,"depth":155,"text":879},{"id":951,"depth":137,"text":952},{"id":1697,"depth":137,"text":1698},[3263,3264],"Golang","Programming","Learn how to implement stack data structure in Golang (Full code)",false,"md","blog\u002Fstack-in-golang\u002Fstack-in-golang-card.webp","stack in golang, how to implement stack in golang, implement stack golang",{},"stack-in-golang","\u002Fblog\u002Fstack-in-golang",{"title":5,"description":3265},"blog\u002Fstack-in-golang","2020-09-14","mbRKHb0d-PVBn35M6irRacIOd8Iidlxp936W49nT5Go",[3278,3285,3291,3299,3308,3315,3322,3329,3335,3341,3347,3353,3359,3369,3375,3382,3389,3396,3402,3409,3415,3421,3427,3433,3439,3445,3451,3457,3464,3471,3477,3483,3489,3495,3501,3507,3513,3519,3525,3531,3537,3543,3549,3556,3562,3568,3574,3581,3587,3593,3600,3607,3613,3620,3626,3633,3639,3646,3652,3658,3664,3670,3676,3682,3688,3694,3700,3706,3708,3714,3721,3727,3734,3740,3746,3752,3759,3765],{"path":3279,"title":3280,"description":3281,"categories":3282,"draft":158,"year":3284,"series":6},"\u002Fblog\u002Fai-assisted-workstation","Building an AI-Assisted Personal Workstation","How I built a personal AI workstation: markdown knowledge base, portable agent skills, handoff-driven sessions. What worked, what broke, what I would change.",[3283,3264],"Productivity","2026-08-26",{"path":3286,"title":3287,"description":3288,"categories":3289,"draft":3266,"year":3290,"series":6},"\u002Fblog\u002Faws-s3-golang","Uploading images to AWS S3 in Golang","In this tutorial I cover how to upload, fetch and manage other operations for objects on AWS S3 in Golang",[3263,3264],"2020-01-12",{"path":3292,"title":3293,"description":3294,"categories":3295,"draft":3266,"year":3298,"series":6},"\u002Fblog\u002Fbooks-for-engineers","Best Books for Software Engineers","Best Books to help you build you software engineering career - ranging from fundamentats, interview prep to productivity.",[3296,3297],"Books","Life","2021-12-26",{"path":3300,"title":3301,"description":3302,"categories":3303,"draft":3266,"year":3307,"series":6},"\u002Fblog\u002Fbuilding-acrons","Building Acrons 🚀","Building Acrons, a one-stop tool to decode everyday acronyms like DIY, FOMO, and BRB without losing your flow.",[3304,3305,3306],"Side Projects","Web","Tools","2020-05-26",{"path":3309,"title":3310,"description":3311,"categories":3312,"draft":3266,"year":3314,"series":6},"\u002Fblog\u002Fcap-theorem","CAP Theorem Explained","Learn the concept and misconceptions around popular CAP theorem in system design.",[3313,3264],"System Design","2021-07-26",{"path":3316,"title":3317,"description":3318,"categories":3319,"draft":3266,"year":3321,"series":6},"\u002Fblog\u002Fcode-reviews","Code Review Checklist","Why code reviews matter, and best practices that catch bugs early and keep code quality high before merge.",[3320],"Engineering Principles","2020-07-20",{"path":3323,"title":3324,"description":3325,"categories":3326,"draft":3266,"year":3328,"series":6},"\u002Fblog\u002Fdark-mode","Add Dark mode to websites","Dark mode is ❤️️ Add it to your websites with little CSS and JS",[3327,3305],"Javascript","2020-07-04",{"path":3330,"title":3331,"description":3332,"categories":3333,"draft":3266,"year":3334,"series":6},"\u002Fblog\u002Fdate-time-golang","Working with Date and Time in Go","Learn how to use time in Golang - Multiple formats, locations and using date.",[3263,3264],"2020-10-09",{"path":3336,"title":3337,"description":3338,"categories":3339,"draft":3266,"year":3340,"series":6},"\u002Fblog\u002Fdefer-in-golang","Understanding Defer In Golang","Learn about defer keyword in golang and how it can help you avoid panics due to bugs.",[3263,3264],"2021-05-05",{"path":3342,"title":3343,"description":3344,"categories":3345,"draft":3266,"year":3346,"series":6},"\u002Fblog\u002Fenums-golang","Implementing Enums in Golang","Enums are a way to defined set of constant values. Learn how to implement enums in Go using iota with examples.",[3263,3264],"2021-12-18",{"path":3348,"title":3349,"description":3350,"categories":3351,"draft":3266,"year":3352,"series":6},"\u002Fblog\u002Fenvironment-variable-golang","Guide to Environment variables in Go","Learn what are environment variables and how to use them in Go",[3263,3264],"2020-08-14",{"path":3354,"title":3355,"description":3356,"categories":3357,"draft":3266,"year":3358,"series":6},"\u002Fblog\u002Ferror-handling-golang","Handle errors the right way — Golang","How to handle errors in golang to make your life easy",[3263,3264],"2020-01-30",{"path":3360,"title":3361,"description":3362,"categories":3363,"draft":158,"year":3366,"series":3367},"\u002Fblog\u002Ffile-attack-document-macros","File Attack Deep Dives, Part 3: Document Macros","How malicious VBA hides in vbaProject.bin, which AutoOpen entry points fire it, and the sandbox signals that catch it.",[3364,3365],"Security","Systems","2026-09-17",{"name":3368,"part":155},"File Attack Deep Dives",{"path":3370,"title":3371,"description":3372,"categories":3373,"draft":3266,"year":3284,"series":3374},"\u002Fblog\u002Ffile-attack-field-guide","How File-Based Attacks Land: A Detection Engineer's Field Guide","A practical taxonomy of how malware and phishing arrive as files, why classic controls miss them, and how detection should think.",[3364,3365],{"name":3368,"part":130},{"path":3376,"title":3377,"description":3378,"categories":3379,"draft":158,"year":3380,"series":3381},"\u002Fblog\u002Ffile-attack-html-smuggling","File Attack Deep Dives, Part 2: HTML Smuggling","How attackers assemble malware inside the browser with Blob URLs, and the URL and script tells that catch it.",[3364,3365],"2026-09-10",{"name":3368,"part":137},{"path":3383,"title":3384,"description":3385,"categories":3386,"draft":158,"year":3387,"series":3388},"\u002Fblog\u002Ffile-attack-lnk-iso","File Attack Deep Dives, Part 5: LNK and ISO Smuggling","How ISO containers and weaponized shortcuts bypass Mark of the Web, and the forensic fields that catch them.",[3364,3365],"2026-10-01",{"name":3368,"part":168},{"path":3390,"title":3391,"description":3392,"categories":3393,"draft":158,"year":3394,"series":3395},"\u002Fblog\u002Ffile-attack-pdf-url-actions","File Attack Deep Dives, Part 4: PDF URL Actions","How PDF OpenAction, Launch, and URI actions turn opening a document into a phishing click, and the action audit that catches them.",[3364,3365],"2026-09-24",{"name":3368,"part":162},{"path":3397,"title":3398,"description":3399,"categories":3400,"draft":3266,"year":3401,"series":6},"\u002Fblog\u002Ffile-upload-golang","Uploading Files in Golang with Multipart Request","Learn how to upload files from your client to server as a multipart request in Golang.",[3263,3264],"2021-03-13",{"path":3403,"title":3404,"description":3405,"categories":3406,"draft":3266,"year":3408,"series":6},"\u002Fblog\u002Fgit-branch","Git Branch 101","Branching is a new path of development that makes it a lot easier to build features. Learn why and how to use branching in git.",[3407,3264],"Git","2022-03-20",{"path":3410,"title":3411,"description":3412,"categories":3413,"draft":3266,"year":3414,"series":6},"\u002Fblog\u002Fgit-pull-request-template","Guide to Pull Request Templates","Improve collaboration and code reviews with pull request templates. Blog include PR template and how to create one on github\u002Fgitlab",[3407,3264],"2023-08-24",{"path":3416,"title":3417,"description":3418,"categories":3419,"draft":3266,"year":3420,"series":6},"\u002Fblog\u002Fgit-remove-sensitive-info","Securing Git: Remove Sensitive Information","Protect your code from security breaches by using BFG tool to remove sensitive information from Git history. Learn how to do it in this comprehensive guide.",[3407,3264],"2023-10-16",{"path":3422,"title":3423,"description":3424,"categories":3425,"draft":3266,"year":3426,"series":6},"\u002Fblog\u002Fgit-tags-explained","Git tags : Explained","What Git tags are, why and when to use them, and how to start tagging releases in your own projects.",[3407,3264],"2020-06-18",{"path":3428,"title":3429,"description":3430,"categories":3431,"draft":3266,"year":3432,"series":6},"\u002Fblog\u002Fgo-dependency-injection","Dependency Injection in Go using Wire","Learn about dependency injection, its benefits and how to implement it in Go services using wire",[3263,3264],"2022-11-26",{"path":3434,"title":3435,"description":3436,"categories":3437,"draft":3266,"year":3438,"series":6},"\u002Fblog\u002Fgo-generics","Introduction to Generics in Go","Learn about generics in Golang, it's benefits and how to implement it in applications.",[3263,3264],"2022-11-27",{"path":3440,"title":3441,"description":3442,"categories":3443,"draft":3266,"year":3444,"series":6},"\u002Fblog\u002Fgo-in-memory-cache","Building In-Memory Cache in Go","Learn about in-memory caching in Golang, it's benefits and how to implement it with and without generics with a TTL(expiry).",[3263,3264],"2024-03-28",{"path":3446,"title":3447,"description":3448,"categories":3449,"draft":3266,"year":3450,"series":6},"\u002Fblog\u002Fgo-makefile","Ultimate Makefile for Golang","Boost your productivity and save time with ultimate Makefile for Golang projects.",[3263,3264],"2024-06-10",{"path":3452,"title":3453,"description":3454,"categories":3455,"draft":3266,"year":3456,"series":6},"\u002Fblog\u002Fgo-middleware","Mastering Middlewares in Golang","Learn about middlewares, their use cases and how to implement them in Golang applications",[3263,3264],"2022-03-13",{"path":3458,"title":3459,"description":3460,"categories":3461,"draft":3266,"year":3463,"series":6},"\u002Fblog\u002Fgo-naming-conventions","Naming Conventions in Golang","Why naming conventions matter in Go, with best practices and practical examples for clear, readable, maintainable code.",[3263,3264,3462],"Code Quality","2023-05-19",{"path":3465,"title":3466,"description":3467,"categories":3468,"draft":3266,"year":3470,"series":6},"\u002Fblog\u002Fgo-with-redis","Go with Redis","A practical introduction to using Redis with Golang to make your applications faster with in-memory data storage.",[3263,3469,3264],"Database","2020-05-03",{"path":3472,"title":3473,"description":3474,"categories":3475,"draft":3266,"year":3476,"series":6},"\u002Fblog\u002Fgolang-maps","Learn Maps in Golang (with examples)","A complete guide to maps in Golang: creating maps, adding and removing items, iterating, and how map equality works.",[3263,3264],"2020-09-10",{"path":3478,"title":3479,"description":3480,"categories":3481,"draft":3266,"year":3482,"series":6},"\u002Fblog\u002Fguide-to-cdn","Guide to Content Delivery Network","CDN is one of the backbone of modern world internet infrastructure. Learn about Content Delivery Network, it's working, types and benefits.",[3313,3264],"2022-01-23",{"path":3484,"title":3485,"description":3486,"categories":3487,"draft":3266,"year":3488,"series":6},"\u002Fblog\u002Fguide-to-rule-engines","Guide to Rule Engines","Rule Engines help in solving changing business requirements with ease. Learn all about Rule engines, it's working, benefits and how to implement one in Golang",[3263,3264],"2022-09-12",{"path":3490,"title":3491,"description":3492,"categories":3493,"draft":3266,"year":3494,"series":6},"\u002Fblog\u002Fhexagonal-architecture","Guide to Hexagonal Architecture","Learn how to design efficient application with hexagonal architecture with practical example",[3313,3264],"2020-12-13",{"path":3496,"title":3497,"description":3498,"categories":3499,"draft":3266,"year":3500,"series":6},"\u002Fblog\u002Fhttp-status-codes","Learn HTTP Status Codes","A tour of HTTP response status codes, what each class means, and when to use which code in your applications.",[3305,3264],"2020-07-30",{"path":3502,"title":3503,"description":3504,"categories":3505,"draft":3266,"year":3506,"series":6},"\u002Fblog\u002Fintroduction-to-goroutines","Introduction to Goroutines","Understand the basics of concurrency and learn how to work with Goroutines in golang.",[3263,3264],"2021-04-10",{"path":3508,"title":3509,"description":3510,"categories":3511,"draft":3266,"year":3512,"series":6},"\u002Fblog\u002Fjson-in-postgres-with-golang","Storing JSON in Postgres with Golang","Learn how to store JSON objects in Postgres and how to implement it in Golang.",[3264,3469,3263],"2021-02-13",{"path":3514,"title":3515,"description":3516,"categories":3517,"draft":3266,"year":3518,"series":6},"\u002Fblog\u002Fjson-web-token","Complete Guide to JWT","JSON Web Tokens are a very compact way to carry information. Learn about JWTs in depth, from its structure to when to use it.",[3264,3305],"2021-11-20",{"path":3520,"title":3521,"description":3522,"categories":3523,"draft":3266,"year":3524,"series":6},"\u002Fblog\u002Flearn-to-say-no","Learning to say No","Learn why it's important to say 'NO'. How it helps in increasing productivity and explore strategies for saying No",[3297,3296],"2022-04-09",{"path":3526,"title":3527,"description":3528,"categories":3529,"draft":3266,"year":3530,"series":6},"\u002Fblog\u002Flearn-unlearn-relearn","Learn - Unlearn - Relearn","Unlearning things to learn new is the way to grow. Discover how to do that!",[3283,3297],"2020-09-25",{"path":3532,"title":3533,"description":3534,"categories":3535,"draft":3266,"year":3536,"series":6},"\u002Fblog\u002Flinting-in-golang","Introduction to Linting in Go","Introduction to improving code quality using linting. Learn how to add linting in your Go projects.",[3263,3264],"2021-07-07",{"path":3538,"title":3539,"description":3540,"categories":3541,"draft":3266,"year":3542,"series":6},"\u002Fblog\u002Fload-balancing","Load Balancing 101","Complete guide on load balancers explaining the internal working and how does it help in making applications efficient.",[3313,3264],"2021-05-29",{"path":3544,"title":3545,"description":3546,"categories":3547,"draft":3266,"year":3548,"series":6},"\u002Fblog\u002Fmaking-decisions-the-right-way","Making Decisions: The right way","Decisions are hard! Learn how to make the right decisions always",[3283,3297],"2020-06-07",{"path":3550,"title":3551,"description":3552,"categories":3553,"draft":3266,"year":3555,"series":6},"\u002Fblog\u002Fmanage-logs-with-logrotate","Using Logrotate to manage logs","Learn how to use logrotate system utility to manage logs with example",[3554,3264],"Linux","2020-09-08",{"path":3557,"title":3558,"description":3559,"categories":3560,"draft":3266,"year":3561,"series":6},"\u002Fblog\u002Fmarshal-structs-golang","Marshal structs the right way: Golang","Why Golang marshals empty structs into your JSON instead of null, and how to marshal structs the right way.",[3263,3264],"2020-03-31",{"path":3563,"title":3564,"description":3565,"categories":3566,"draft":3266,"year":3567,"series":6},"\u002Fblog\u002Fnotes-almanack-naval","Book Notes : Almanack of Naval Ravikant","My notes\u002Fhighlights from Almanack of Naval Ravikant book by Eric Jorgenson",[3296,3297],"2020-10-17",{"path":3569,"title":3570,"description":3571,"categories":3572,"draft":3266,"year":3573,"series":6},"\u002Fblog\u002Fnotes-anything-you-want","Book Notes : Anything you want","My notes\u002Fhighlights from Anything you want book by Derek Sivers",[3296,3297],"2021-09-25",{"path":3575,"title":3576,"description":3577,"categories":3578,"draft":3266,"year":3580,"series":6},"\u002Fblog\u002Fnotes-getting-real","Book Notes : Getting Real","My notes and highlights from Getting Real by Jason Fried and David Heinemeier Hansson on building web applications.",[3296,3579],"Startups","2020-11-03",{"path":3582,"title":3583,"description":3584,"categories":3585,"draft":3266,"year":3586,"series":6},"\u002Fblog\u002Fnotes-hell-yeah-or-no","Book Notes : Hell Yeah or No","My notes\u002Fhighlights from Hell Yeah or No book by Derek Sivers",[3296,3297],"2020-09-16",{"path":3588,"title":3589,"description":3590,"categories":3591,"draft":3266,"year":3592,"series":6},"\u002Fblog\u002Fnotes-how-to-be-a-capitalist","Book Notes : How to Be a Capitalist Without Any Capital","My notes\u002Fhighlights from How to Be a Capitalist Without Any Capital by Nathan Latka",[3296,3579],"2020-01-07",{"path":3594,"title":3595,"description":3596,"categories":3597,"draft":3266,"year":3599,"series":6},"\u002Fblog\u002Fnotes-lean-b2b","Book Notes : Lean B2B","My notes and highlights from Lean B2B by Étienne Garbugli on assessing markets, building MVPs, and selling to businesses.",[3296,3598],"Entrepreneurship","2022-07-02",{"path":3601,"title":3602,"description":3603,"categories":3604,"draft":3266,"year":3606,"series":6},"\u002Fblog\u002Fnotes-lets-talk-money","Book Notes : Let's Talk Money","My notes and highlights from Let's Talk Money by Monica Halan on managing personal finances and savings.",[3296,3605],"Personal Finance","2021-02-26",{"path":3608,"title":3609,"description":3610,"categories":3611,"draft":3266,"year":3612,"series":6},"\u002Fblog\u002Fnotes-obviously-awesome","Book Notes : Obviously Awesome","My notes and highlights from Obviously Awesome by April Dunford on product positioning and marketing strategy.",[3296,3579],"2020-04-26",{"path":3614,"title":3615,"description":3616,"categories":3617,"draft":3266,"year":3619,"series":6},"\u002Fblog\u002Fnotes-refactoring-ui","Book Notes: Refactoring UI","My notes and highlights from Refactoring UI by Adam Wathan and Steve Schoger, full of practical design tips for engineers.",[3296,3618],"Design","2020-05-09",{"path":3621,"title":3622,"description":3623,"categories":3624,"draft":3266,"year":3625,"series":6},"\u002Fblog\u002Fnotes-rework","Book Notes: Rework","My notes and highlights from Rework by Jason Fried and David Heinemeier Hansson on a better way to succeed in business.",[3296,3579],"2021-04-14",{"path":3627,"title":3628,"description":3629,"categories":3630,"draft":3266,"year":3632,"series":6},"\u002Fblog\u002Fone-on-one-meetings","Guide to Effective 1:1 Meetings","One on One meetings are important for your personal & professional growth. Learn how to master 1:1s with your manager and peers.",[3631,3283],"Career","2023-03-05",{"path":3634,"title":3635,"description":3636,"categories":3637,"draft":3266,"year":3638,"series":6},"\u002Fblog\u002Fpersonal-okrs","Personal OKRs for Success","Why one should set personal OKRs and how to achieve success with them",[3283,3297],"2020-06-27",{"path":3640,"title":3641,"description":3642,"categories":3643,"draft":3266,"year":3645,"series":6},"\u002Fblog\u002Fpoker-tips","Poker Tips: Johns Hopkins Poker Class","Notes from Johns Hopkins poker course. This guide will help you improve in Poker and win some large pots.",[3297,3644],"Poker","2020-06-13",{"path":3647,"title":3648,"description":3649,"categories":3650,"draft":3266,"year":3651,"series":6},"\u002Fblog\u002Fpomodoro","Get work done: The Pomo Way","Learn to focus and get productive by following the Pomodoro Technique",[3283],"2020-10-24",{"path":3653,"title":3654,"description":3655,"categories":3656,"draft":3266,"year":3657,"series":6},"\u002Fblog\u002Fpostgres-constraints","Postgres Constraints","Constraints are line of defense for database. Explore various types of constrainsts in postgres",[3469,3264],"2020-11-07",{"path":3659,"title":3660,"description":3661,"categories":3662,"draft":3266,"year":3663,"series":6},"\u002Fblog\u002Fppf-explained","PPF Explained","Learn basics about Public Provident Fund and why you should invest",[3297,3605],"2020-12-24",{"path":3665,"title":3666,"description":3667,"categories":3668,"draft":3266,"year":3669,"series":6},"\u002Fblog\u002Fproductivity-chrome-extensions","Boost Productivity with Chrome Extensions","Utitizing chrome extensions to boost your productivity!",[3283,3306,3305],"2020-04-24",{"path":3671,"title":3672,"description":3673,"categories":3674,"draft":3266,"year":3675,"series":6},"\u002Fblog\u002Fproductivity-in-vscode","Improve your productivity with VS Code","Key VS Code features like the integrated terminal, shortcuts, and extensions that improved my everyday productivity.",[3283,3264],"2020-03-12",{"path":3677,"title":3678,"description":3679,"categories":3680,"draft":3266,"year":3681,"series":6},"\u002Fblog\u002Freading-101","Improving Reading 101","Why reading matters, how to build a reading habit, and what to read next - from my own journey into books.",[3296,3297],"2020-04-04",{"path":3683,"title":3684,"description":3685,"categories":3686,"draft":3266,"year":3687,"series":6},"\u002Fblog\u002Freverse-proxy","Understanding Reverse Proxy","Learn about reverse proxy, how it is different from forward proxy and explore advantages of using it in system design.",[3313,3264],"2021-10-03",{"path":3689,"title":3690,"description":3691,"categories":3692,"draft":3266,"year":3693,"series":6},"\u002Fblog\u002Frunning-periodic-background-task-golang","Running periodic background tasks in Golang","How to run periodic background tasks in Golang by combining cron-style scheduling with background execution.",[3263,3264],"2019-11-21",{"path":3695,"title":3696,"description":3697,"categories":3698,"draft":3266,"year":3699,"series":6},"\u002Fblog\u002Fsessions-in-golang","Sessions using Golang and Redis","How cookies and sessions work, and how to implement persistent login sessions in Golang using Redis.",[3263,3469,3264],"2020-02-25",{"path":3701,"title":3702,"description":3703,"categories":3704,"draft":3266,"year":3705,"series":6},"\u002Fblog\u002Fsolid-dry-kiss-yagni","Solid Dry Kiss Yagni","An introduction to the SOLID, DRY, KISS, and YAGNI principles and how they help you write cleaner, robust code.",[3320],"2020-07-17",{"path":3272,"title":5,"description":3265,"categories":3707,"draft":3266,"year":3275,"series":6},[3263,3264],{"path":3709,"title":3710,"description":3711,"categories":3712,"draft":3266,"year":3713,"series":6},"\u002Fblog\u002Fstart-oss-today","Start your Open Source journey today","Start your OSS journey with intro to GIT. Participate in Hacktoberfest!",[3407,3264],"2020-09-19",{"path":3715,"title":3716,"description":3717,"categories":3718,"draft":3266,"year":3720,"series":6},"\u002Fblog\u002Fsticky-social-bar","Sticky social share component in HTML","Learn how to build a social media sharing component in HTML and add it to your website.",[3264,3719],"Frontend","2021-02-05",{"path":3722,"title":3723,"description":3724,"categories":3725,"draft":3266,"year":3726,"series":6},"\u002Fblog\u002Fterm-insurance","Term insurance Simplified","Everything you need to know before you buy a term insurance.",[3297,3605],"2020-11-29",{"path":3728,"title":3729,"description":3730,"categories":3731,"draft":3266,"year":3733,"series":6},"\u002Fblog\u002Fterminal-output-with-redirection","Handling terminal outputs with Redirection","Learn how to handle terminal outputs with Redirection and saving it to files",[3554,3732,3264],"Terminal","2020-09-06",{"path":3735,"title":3736,"description":3737,"categories":3738,"draft":3266,"year":3739,"series":6},"\u002Fblog\u002Fthink-and-grow-rich","Book Notes: Think and Grow Rich","My notes and highlights from Think and Grow Rich by Napoleon Hill, covering its process for building wealth.",[3296,3297],"2020-05-19",{"path":3741,"title":3742,"description":3743,"categories":3744,"draft":3266,"year":3745,"series":6},"\u002Fblog\u002Ftransactions-postgres-golang","Transactions on Postgres with Golang","Performing Postgres database operations in Golang with GORM, from basic queries to full transaction support.",[3263,3469,3264],"2020-03-18",{"path":3747,"title":3748,"description":3749,"categories":3750,"draft":3266,"year":3751,"series":6},"\u002Fblog\u002Fwaitgroups-in-golang","WaitGroups in Golang","Learn about WaitGroups in golang and how to use them to perform concurrent operations without blocking the main thread.",[3263,3264],"2022-05-31",{"path":3753,"title":3754,"description":3755,"categories":3756,"draft":3266,"year":3758,"series":6},"\u002Fblog\u002Fwhat-i-use","What I Use: Products and Softwares","List of what I use in my day to day life ranging from terminal, editors, softwares, devices to accessories",[3297,3757],"Tech","2024-06-01",{"path":3760,"title":3761,"description":3762,"categories":3763,"draft":3266,"year":3764,"series":6},"\u002Fblog\u002Fyear-in-review-2020","Year in Review: 2020","It's a wrap! 2020 was a crazy year, See how my year went!",[3297],"2020-12-31",{"path":3766,"title":3767,"description":3768,"categories":3769,"draft":3266,"year":3770,"series":6},"\u002Fblog\u002Fyear-in-review-2021","Year in Review: 2021","It's a wrap! 2021 was a mixed bag, full of ups and downs. Key Goal for 2022: Start now!",[3297],"2021-12-31",1788674977279]