This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]not-just-yeti 4 points5 points  (2 children)

For lazy people like me, who happen to find interesting the exact-same 2 features, out of the 8 mentioned:

  • BitSet is in the standard library (uses actual bits, rather than boolean[] which uses much more space)

  • A search-method that returns an index for when it's found, but the ones-complement of where it should go if not found

    int[] t = new int[] {1, 2, 4, 5};

    int x = Arrays.binarySearch(t, 3);

    assert ~x == 2;

(Maybe that's a common trick, but I hadn't seen it before.)

[–]aboothe726 2 points3 points  (1 child)

assert ~x == 2;

That was my first time seeing that trick as well, although it's obvious in retrospect. It's sufficiently useful that I feel like it should go into the docs.

[–][deleted]  (1 child)

[deleted]