Skip to content

Commit 6c692e8

Browse files
committed
[REFACTOR] [Hacker Rank] Interview Preparation Kit: Miscellaneous: Flipping bits.
* Adjusted the interface to match what hackerrank expects.
1 parent f8930d8 commit 6c692e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hackerrank/interview_preparation_kit/miscellaneous/flipping-bits.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
const __BINARY_BASE__ = 2;
66
const __NUMBER_SIZE_IN_BITS__ = 32;
77

8-
export function flippingBits(n: number): number {
8+
function flippingBits(n: number): number {
99
let nBinaryStr = n.toString(__BINARY_BASE__);
1010
nBinaryStr = nBinaryStr.padStart(__NUMBER_SIZE_IN_BITS__, '0');
1111

@@ -23,3 +23,4 @@ export function flippingBits(n: number): number {
2323
}
2424

2525
export default { flippingBits };
26+
export { flippingBits };

0 commit comments

Comments
 (0)