Remove Even Integers from an Array | Implementation | Coding Interview Question

Поділитися
Вставка
  • Опубліковано 22 гру 2021
  • ►Full DSA Course - • Data Structures and Al...
    ►Follow me on Instagram - bit.ly/intrvwkckstrt
    ►Follow me on LinkedIn - bit.ly/fllwlkdn
    ►Enroll in the complete course: bit.ly/3W4qthg
    ►Source Code - github.com/dinesh-varyani/ds-...
    ►Download DSA Animation Slides - techready.in/courses/150-dsa-...
    ►Click here to subscribe - ua-cam.com/users/hubbersp...
    Watch all my playlist here:
    ►Data Structures and Algorithms Course playlist: • Data Structures and Al...
    ►Mastering JUnit 5 - ua-cam.com/users/playlist?list...
    ►Mastering Mockito 3 - • Mockito 3 Tutorials
    ►Analysis of Algorithms - • Analysis of Algorithms
    ►Linked List Data Structures - • Linked List Data Struc...
    ►Array Data Structures - • Playlist
    ►Stack Data Structure - • Stack Data Structure
    ►Queue Data Structure - • Queue Data Structure
    ►Binary Tree Data Structure - • Binary Tree Data Struc...
    ►Graph Data Structure - • Graph Data Structure
    ►Binary Heap Data Structure - • Binary Heap Data Struc...
    ►Trie Data Structure - • Trie Data Structure
    ►Dynamic Programming Algorithms - • Dynamic Programming Al...
    ►Hashing Data Structures - • Hashing Data Structures
    ►Sorting and Searching - • Sorting and Searching
    ►String Algorithms - • String Algorithms
    Want to land a software engineering job in the IT industry? This course - 'Visualizing Data Structures and Algorithms' is here to help. The course walks you through multiple Java algorithms, data structures problems, and their solutions with step by step visualizations, so that you are actually learning instead of blindly memorizing solutions.
    The course covers in and outs of Data Structures and Algorithms in Java. Java is used as the programming language in the course. Students familiar with Javascript, Python, C#, C++, C, etc will also get to learn concepts without any difficulty. The implementation of various Algorithms and Data Structures have been demonstrated and implemented through animated slides. It covers many interview room questions on Algorithms and Data Structures. The questions and solutions are demonstrated by -
    1. Animated slide. (To make visualization of algorithms faster)
    2. Coding algorithm on IDE.
    The course covers topics such as -
    0. Algorithm Analysis
    1. Arrays
    2. Matrix
    3. Singly Linked List
    4. Doubly Linked List
    5. Circular Singly Linked List
    6. Stacks
    7. Queues
    8. Binary Tree
    9. Binary Search Tree
    10. Graphs
    11. Priority Queues and Heaps
    12. Recursion
    13. Searching
    14. Sorting
    15. Strings
    16. Trie Data Structure
    17. Dynamic Programming
    and many more ...
    #dsa #algorithms #coding

КОМЕНТАРІ • 26

  • @shubhamagarwal1434
    @shubhamagarwal1434 2 роки тому +3

    Best series for DS & Algo. I am also 10 yrs java exp guy. Was looking for DS & Algo free course over UA-cam with java implementation and found this. Hats Off To You Man....Excellent Work. GOD BLESS YOU :)

  • @mustafakamalsirajudeen8133
    @mustafakamalsirajudeen8133 Рік тому +1

    Looks excellent at the first site. Will go thru the videos further. Thanks man.

  • @ascar66
    @ascar66 Рік тому +1

    Thank you for your efforts. Comment to support your channel.

  • @shiny.5019
    @shiny.5019 Рік тому

    sir what about the circular doubly list? you haven't added them to the playlist!!

  • @AhsanAli-vz6mg
    @AhsanAli-vz6mg 2 роки тому +2

    Superb bro
    make video on kmp algorithm (pattern matching)

  • @PrashantMalviya-jk8vp
    @PrashantMalviya-jk8vp 2 роки тому +1

    Thank U sir

  • @balikeanna5382
    @balikeanna5382 Рік тому

    I think this can be done with just one line of code List num=Arrays.asList(1,2,3,5,6,7,8);
    num.stream().filter(n-> n%2!=0).forEach(System.out :: println); since we need best practice for Algorithms

  • @vengateshm2122
    @vengateshm2122 2 роки тому +3

    Thank You. Very useful. Time complexity is O(N) + O(N) = O(N)
    What is space complexity?

    • @itsdineshvaryani
      @itsdineshvaryani  2 роки тому +1

      its O(n) ...

    • @vengateshm2122
      @vengateshm2122 2 роки тому +3

      @@itsdineshvaryani Yeah. Worst case if all are odd numbers. Thank You!!!

  • @ankitsheth111
    @ankitsheth111 2 роки тому +1

    Why we required two loops ? Can we not count the length of last result array, to ignore the first loop ? Just a suggestion.

    • @itsdineshvaryani
      @itsdineshvaryani  2 роки тому

      What do you mean by length of last result array ?? Even integers can be anywhere !!!

    • @rohitkanchanshaw1482
      @rohitkanchanshaw1482 Рік тому

      @@itsdineshvaryani He wanted to refer the input array that has both odd and even integer....Odd Integer count cannot be greater than the array itself

    • @caioeduardo5964
      @caioeduardo5964 Рік тому

      He needs the first loop because he doesn't know how many odd numbers the array will have. He could create other array with the same size and use just one loop, but if the first array have even numbers, the new array will have the number 0 in positions where numbers were even.

  • @sumedhtayade821
    @sumedhtayade821 Рік тому

    the first step is to find the number of odd numbers and second step is to print them

  • @chiranthanb6202
    @chiranthanb6202 Рік тому +1

    int [] arr = {2,3,4,5,6,7};
    for(int i =0; i

    • @smarty420ful
      @smarty420ful Рік тому +1

      Hey Chiranthan, the question is to remove even integers and the one you wrote will just display the odd numbers from the array,

    • @chiranthanb6202
      @chiranthanb6202 Рік тому

      @@smarty420ful thank you. I got it

  • @akalya14
    @akalya14 Рік тому +1

    How to.get user input ?