File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/hackerrank/interview_preparation_kit/search Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 11/**
2- * @link Problem export functioninition [[docs/hackerrank/interview_preparation_kit/search/swap-nodes-algo.md]]
2+ * @link Problem definition [[docs/hackerrank/interview_preparation_kit/search/swap-nodes-algo.md]]
33 */
44
55import { Node } from '../../lib/Node.js' ;
66
77// CONSTANTS
8- export const __INITIAL_LEVEL__ = 1 ;
9- export const __ROOT_VALUE__ = 1 ;
10- export const __LEAF_VALUE__ = - 1 ;
8+ const __INITIAL_LEVEL__ = 1 ;
9+ const __ROOT_VALUE__ = 1 ;
10+ const __LEAF_VALUE__ = - 1 ;
1111const __RADIX__ = 10 ;
1212
1313export class Tree {
@@ -97,7 +97,7 @@ export class Tree {
9797 }
9898}
9999
100- export function swapNodes ( indexes , queries ) {
100+ function swapNodes ( indexes , queries ) {
101101 const tree = new Tree ( indexes ) ;
102102 let nodeCollector = tree . getCollector ( ) ;
103103 const output = [ ] ;
@@ -127,3 +127,4 @@ export function swapNodes(indexes, queries) {
127127}
128128
129129export default { swapNodes, __INITIAL_LEVEL__ } ;
130+ export { swapNodes , __INITIAL_LEVEL__ } ;
You can’t perform that action at this time.
0 commit comments