Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update README.md#61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
dainpfx00342 wants to merge1 commit intorampatra:master
base:master
Choose a base branch
Loading
fromdainpfx00342:dainpfx00342
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
54 changes: 27 additions & 27 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,32 +8,32 @@ You can also refer to my [Java Notes](http://blog.rampatra.com/category/java) fo

## Contents

1. [Basic Practice](/src/main/java/com/rampatra/):
1. [Arrays](/src/main/java/com/rampatra/arrays)
2. [Backtracking](/src/main/java/com/rampatra/backtracking)
3. [Bits](/src/main/java/com/rampatra/bits)
4. [Blockchain Demo](/src/main/java/com/rampatra/blockchain)
5. [Dynamic Programming](/src/main/java/com/rampatra/dynamicprogramming)
6. [Graphs](/src/main/java/com/rampatra/graphs)
7. [Java 8](/src/main/java/com/rampatra/java8)
8. [Linked Lists](/src/main/java/com/rampatra/linkedlists)
9. [Miscellaneous](/src/main/java/com/rampatra/misc)
10. [Permutations](/src/main/java/com/rampatra/permutations)
11. [Searching](/src/main/java/com/rampatra/searching)
12. [Sorting](/src/main/java/com/rampatra/sorting)
13. [Stacks](/src/main/java/com/rampatra/stacks)
14. [Strings](/src/main/java/com/rampatra/strings)
15. [Threads](/src/main/java/com/rampatra/threads)
16. [Trees](/src/main/java/com/rampatra/trees)
2. [Cracking the Coding Interview](/src/main/java/com/ctci):
1. [Arrays and Strings](/src/main/java/com/ctci/arraysandstrings)
2. [Linked Lists](/src/main/java/com/ctci/linkedlists)
3. [Stacks and Queues](/src/main/java/com/ctci/stacksandqueues)
4. [Trees and Graphs](/src/main/java/com/ctci/treesandgraphs)
5. [Bit Manipulation](/src/main/java/com/ctci/bitmanipulation)
6. [Recursion and DP](/src/main/java/com/ctci/recursionanddp)
3. [LeetCode](/src/main/java/com/leetcode).
4. [HackerRank](/src/main/java/com/hackerrank).
1. [Basic Practice](/my/com/rampatra/):
1. [Arrays](/my/com/rampatra/arrays)
2. [Backtracking](/my/com/rampatra/backtracking)
3. [Bits](/my/com/rampatra/bits)
4. [Blockchain Demo](/my/com/rampatra/blockchain)
5. [Dynamic Programming](/my/com/rampatra/dynamicprogramming)
6. [Graphs](/my/com/rampatra/graphs)
7. [Java 8](/my/com/rampatra/java8)
8. [Linked Lists](/my/com/rampatra/linkedlists)
9. [Miscellaneous](/my/com/rampatra/misc)
10. [Permutations](/my/com/rampatra/permutations)
11. [Searching](/my/com/rampatra/searching)
12. [Sorting](/my/com/rampatra/sorting)
13. [Stacks](/my/com/rampatra/stacks)
14. [Strings](/my/com/rampatra/strings)
15. [Threads](/my/com/rampatra/threads)
16. [Trees](/my/com/rampatra/trees)
2. [Cracking the Coding Interview](/my/com/ctci):
1. [Arrays and Strings](/my/com/ctci/arraysandstrings)
2. [Linked Lists](/my/com/ctci/linkedlists)
3. [Stacks and Queues](/my/com/ctci/stacksandqueues)
4. [Trees and Graphs](/my/com/ctci/treesandgraphs)
5. [Bit Manipulation](/my/com/ctci/bitmanipulation)
6. [Recursion and DP](/my/com/ctci/recursionanddp)
3. [LeetCode](/my/com/leetcode).
4. [HackerRank](/my/com/hackerrank).


## Environment
Expand All@@ -53,4 +53,4 @@ MacBook Pro

---

_P.S. For any queries or concerns, you can reach out to me on [Twitter](https://twitter.com/ram__patra). I'll try my best to help 🙏. And, if you're keen to know what I'm currently working on then check out [Presentify](https://presentify.compzets.com)._
_P.S. For any queries or concerns, you can reach out to me on [Twitter](https://twitter.com/ram__patra). I'll try my best to help 🙏. And, if you're keen to know what I'm currently working on then check out [Presentify](https://presentifyapp.com), or [ToDoBar](https://todobarapp.com/)._
5 changes: 5 additions & 0 deletionspom.xml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,6 +60,11 @@
<artifactId>junit-jupiter-api</artifactId>
<version>5.5.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<version>21</version>
</dependency>
</dependencies>

<profiles>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.arraysandstrings;
packagemy.com.ctci.arraysandstrings;

import java.util.Arrays;

Expand All@@ -15,7 +15,7 @@ public class CheckPermutation {
* @param s2
* @return
*/
private static boolean isOnePermutationOfOther(String s1, String s2) {
public static boolean isOnePermutationOfOther(String s1, String s2) {
if (s1.length() != s2.length()) {
return false;
}
Expand All@@ -35,7 +35,7 @@ private static boolean isOnePermutationOfOther(String s1, String s2) {
* @param s2
* @return
*/
private static boolean isOnePermutationOfOtherGivenThatStringsContainOnlyAscii(String s1, String s2) {
public static boolean isOnePermutationOfOtherGivenThatStringsContainOnlyAscii(String s1, String s2) {
if (s1.length() != s2.length()) {
return false;
}
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.arraysandstrings;
packagemy.com.ctci.arraysandstrings;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.arraysandstrings;
packagemy.com.ctci.arraysandstrings;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.arraysandstrings;
packagemy.com.ctci.arraysandstrings;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.arraysandstrings;
packagemy.com.ctci.arraysandstrings;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.arraysandstrings;
packagemy.com.ctci.arraysandstrings;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.arraysandstrings;
packagemy.com.ctci.arraysandstrings;

/**
* Assume you have a method isSubString which checks if one word is a substring of another. Given two
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.arraysandstrings;
packagemy.com.ctci.arraysandstrings;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.arraysandstrings;
packagemy.com.ctci.arraysandstrings;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.bitmanipulation;
packagemy.com.ctci.bitmanipulation;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.bitmanipulation;
packagemy.com.ctci.bitmanipulation;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.bitmanipulation;
packagemy.com.ctci.bitmanipulation;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.bitmanipulation;
packagemy.com.ctci.bitmanipulation;

import java.util.Arrays;

Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.bitmanipulation;
packagemy.com.ctci.bitmanipulation;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.bitmanipulation;
packagemy.com.ctci.bitmanipulation;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.bitmanipulation;
packagemy.com.ctci.bitmanipulation;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.bitmanipulation;
packagemy.com.ctci.bitmanipulation;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.linkedlists;
packagemy.com.ctci.linkedlists;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.linkedlists;
packagemy.com.ctci.linkedlists;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.linkedlists;
packagemy.com.ctci.linkedlists;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
package com.ctci.linkedlists;
package my.com.ctci.linkedlists;

import my.com.rampatra.linkedlists.DetectAndRemoveLoop;

/**
* @author rampatra
Expand All@@ -15,7 +17,7 @@ public class LoopDetection {
* Input: A -> B -> C -> D -> E -> C [the same C as earlier]
* Output: C
* <p>
* See {@linkcom.rampatra.linkedlists.DetectAndRemoveLoop} for a slightly more complex problem.
* See {@link DetectAndRemoveLoop} for a slightly more complex problem.
*
* @param head the starting node of the linked list
* @return the {@code Node} where the loop starts, {@code null} otherwise.
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.linkedlists;
packagemy.com.ctci.linkedlists;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.linkedlists;
packagemy.com.ctci.linkedlists;

import java.util.Stack;

Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.linkedlists;
packagemy.com.ctci.linkedlists;

/**
* Write code to partition a linked list around a value x, such that all nodes less than x come before all
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.linkedlists;
packagemy.com.ctci.linkedlists;

import java.util.HashSet;
import java.util.Set;
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.linkedlists;
packagemy.com.ctci.linkedlists;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
package com.ctci.recursionanddp;
package my.com.ctci.recursionanddp;

import my.com.rampatra.dynamicprogramming.FibonacciNumbers;

/**
* The fabled fibonacci numbers problem with three different solutions.
* The {@link FibonacciNumber#fibonacciBottomUpOptimized(int)} version is the most optimized among all w.r.t space
* and time. See {@linkcom.rampatra.dynamicprogramming.FibonacciNumbers} for Fibonacci series.
* and time. See {@link FibonacciNumbers} for Fibonacci series.
*
* @author rampatra
* @since 2019-02-26
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.stacksandqueues;
packagemy.com.ctci.stacksandqueues;

import java.util.NoSuchElementException;
import java.util.Stack;
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.stacksandqueues;
packagemy.com.ctci.stacksandqueues;

import java.util.Arrays;
import java.util.Stack;
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
package com.ctci.stacksandqueues;
package my.com.ctci.stacksandqueues;


import com.sun.tools.javac.util.Assert;

import java.util.Stack;

Expand DownExpand Up@@ -45,18 +45,18 @@ private static void minPop(int item) {
}

public static void main(String[] args) {
push(2);
push(5);
push(1);
push(1);
push(6);
push(8);
Assert.check(min() == 1);
pop();
pop();
pop();
Assert.check(min() == 1);
pop();
Assert.check(min() == 2);
// push(2);
// push(5);
// push(1);
// push(1);
// push(6);
// push(8);
// Assert.check(min() == 1);
// pop();
// pop();
// pop();
// Assert.check(min() == 1);
// pop();
// Assert.check(min() == 2);
}
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.stacksandqueues;
packagemy.com.ctci.stacksandqueues;

import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.treesandgraphs;
packagemy.com.ctci.treesandgraphs;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.treesandgraphs;
packagemy.com.ctci.treesandgraphs;

/**
* Implement a function to check if a binary tree is balanced. For the purposes of this question, a balanced
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.treesandgraphs;
packagemy.com.ctci.treesandgraphs;

/**
* @author rampatra
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
package com.ctci.treesandgraphs;
package my.com.ctci.treesandgraphs;

import my.com.rampatra.trees.LeastCommonAncestorInBT;

/**
* Design an algorithm and write code to find the first common ancestor of two nodes in a binary
Expand All@@ -21,7 +23,7 @@ public class FirstCommonAncestor {
* - Returns null, if neither p nor q are in root's subtree.
* - Else, returns the common ancestor of p and q.
* <p>
* See {@linkcom.rampatra.trees.LeastCommonAncestorInBT} for a better answer.
* See {@link LeastCommonAncestorInBT} for a better answer.
*
* @param root
* @param a
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.treesandgraphs;
packagemy.com.ctci.treesandgraphs;

/**
* Design an algorithm and write code to find the first common ancestor of two nodes in a binary
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.treesandgraphs;
packagemy.com.ctci.treesandgraphs;

import java.util.HashSet;
import java.util.Set;
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.treesandgraphs;
packagemy.com.ctci.treesandgraphs;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
package com.ctci.treesandgraphs;
packagemy.com.ctci.treesandgraphs;

/**
* Given a sorted (increasing order) array with unique integer elements, write
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp