Skip to main content

Questions tagged [bitwise]

Bitwise refers to a bitwise operation which operates on one or more bit patterns or binary numerals at the level of their individual bits.

1 vote
1 answer
100 views

Intro (See the version 1.0.0.) (See the GitHub repository.) This time I have got rid of some generic classes and adapted the entire code base to deal with byte ...
coderodde's user avatar
  • 32.3k
5 votes
1 answer
464 views

Intro (See the version A Java program for compressing/decompressing files via Huffman algorithms (version 1.1.1).) (The full repository is here. It contains also some unit tests that do not fit in ...
coderodde's user avatar
  • 32.3k
2 votes
1 answer
146 views

Intro (This is the continuation of HuffmannEncoder.java - computing prefix codes for arbitrary (generic) alphabets.) (See the GitHub repository.) This time: I have fixed the misspelled ...
coderodde's user avatar
  • 32.3k
4 votes
2 answers
359 views

(See the continuation of this post at HuffmanEncoder.java - computing prefix codes for arbitrary (generic) alphabets - Take II.) I have this Java implementation of the Huffmann encoding. It looks like ...
coderodde's user avatar
  • 32.3k
7 votes
6 answers
789 views

Is there a more direct way (loop-free) to compute this number than computing a level and then going back? ...
CPlus's user avatar
  • 1,467
3 votes
2 answers
849 views

Intro In this post, I will present three (3) non-negative integer encoding techniques: Elias gamma coding Elias delta coding Golomb-Rice coding Code ...
coderodde's user avatar
  • 32.3k
4 votes
0 answers
85 views

I have implemented the SHA1 algorithm in Zig, as a learning exercise, to teach myself both Zig and the actual algorithm behind SHA1. Now the second part I think I understood well enough. The ...
Rohit Tanwar's user avatar
10 votes
4 answers
1k views

I am not looking for feedback on the algorithm itself, but rather on the implementation; things like modern C++20 writing, style, proper ways to test and handle the validity of input (should I be ...
user1446642's user avatar
5 votes
5 answers
3k views

I need the bitwise XOR (exclusive-OR) of a list of integers (a function that is to ^ as sum is to ...
Watchduck's user avatar
  • 230
6 votes
2 answers
333 views

I have a very hot segment of code in a large project. I've extracted the relevant segment and a toy example to illustrate it. The project involves an unavoidable combinatorial explosion related to ...
Dave's user avatar
  • 163
13 votes
8 answers
2k views

I was asked this problem in an interview, and this is the solution I came up with. I was told it's not the most efficient solution, but I can't think of any other solution. This is the problem. ...
Jacob's user avatar
  • 133
6 votes
2 answers
125 views

I originally premiered this code to the internet in this StackOverflow post, and per a recommendation through one of the comments, I am reposting it here. I am making a floating-point number set ...
Xavier Pedraza's user avatar
2 votes
0 answers
73 views

I have this GitHub repository (BitPredictor.java). Basically, I tried to harness a machine learning model for predicting bit strings. I have implemented it to the best of my understanding and have ...
coderodde's user avatar
  • 32.3k
5 votes
1 answer
297 views

I saw this question on one of the socials, presented as an Apple interview question. I have had to paraphrase as it was not given in text format. (Credit: Instagram @greghogg5) Given a string (S) ...
Romeo Lima's user avatar
2 votes
0 answers
102 views

First my apologies. My mental faculties currently leave rather a lot to be desired and I have thus spend an inordinate amount of time on this pet project of mine, testing myself if you will. I find it ...
Zacariaz's user avatar
  • 383

15 30 50 per page
1
2 3 4 5
24